entryway
Forum Staple
Posts: 2522
Registered: 01-04 |
Graf Zahl said:
That reminds me, is Eternity still using the Killoughized version of R_PointToAngle? Interestingly it's both far less readable and creates less efficient code than the original in Doom.exe...
not so much though :)
code: unsigned int i, k, tic;
tic = SDL_GetTicks();
for(i = 0; i < 1e8; i++)
{
k += R_PointToAngle(k, i);
}
I_Error("%d %d", SDL_GetTicks() - tic, k);
~1412 msec for Boom
~1374 msec for Carmack
So you can save ~0.04 sec with 100 billions of PointToAngle
btw, zdoom version (which is not used, but code is there) is 1710 msec - much slower. Used (precise) version of course is super slow - 8140 msec.
Last edited by entryway on 09-08-09 at 19:55
|