|Faster divides email@example.com (1995-10-14)|
|Re: Faster divides firstname.lastname@example.org (1995-10-23)|
|Re: Faster divides email@example.com (1995-10-25)|
|From:||firstname.lastname@example.org (Stuart Denman)|
|Keywords:||arithmetic, performance, question|
|Organization:||Computer Science & Engineering, U of Washington, Seattle|
|Date:||Sat, 14 Oct 1995 10:18:15 GMT|
I remember someone saying there was a trick to speed up something like this
where you have all long variables and you divide multiple times by the same
...do some calculations to find values for them...
dsh = (dsh << 16) / dy;
dtx = (dtx << 16) / dy;
dty = (dty << 16) / dy;
I tried using 3 floating-point multiplies, but that is way slower, even on
a Pentium due to the large speed hit of converting back-and-forth from
integer to floating-point.
Does anyone know of an algorithm to speed this up without having to do these
3 very similar divides? It seems like there would be one since you are
dividing by the exact same value!
Thanks for any help you can offer,
Return to the
Search the comp.compilers archives again.