5E-324 / Imagina

One of the fastest Mandelbrot set renderer & explorer.
GNU Affero General Public License v3.0
20 stars 0 forks source link

Optimization in DPEvaluation #4

Open hrkalona opened 1 year ago

hrkalona commented 1 year ago

A small optimization can be done on DPEvaluation : inside SRContext.EvaluateLA();

during the LA[j].Evaluate(temp, dz, dc);

if dc is 0 then some multiplications and additions can be ignored. DC will be a complex at this point so it was already converted from FloatExp to double, which will result to a zero complex number. This will be 100% true on all deep zooms. You can add a boolean on the beggining of DPEvaluation which checks dc for zero and then this boolean can be used inside SRContext.EvaluateLA() to use an overloaded function: LA[j].Evaluate(temp, dz);