Andrea Fontana: > Hmm reading code i verified that i can gain a 10% writing: > > imd dSquared = sqrt(dx ^^ 2 + dy ^^ 2 + dz ^^ 2); > imd mag = dt / (dSquared * dSquared^^2); > > Around line 115. Give it a try...
My version performs a sqrt and one multiplication, while your version performs one sqrt and two multiplications. On my PC my version is faster. Bye, bearophile