der Mouse wrote:
I don't yet understand the code enough to know how
much of the
complication is actually necessary.
I'm sure it was the result of someone being familiar with the original
architecture and compiler, and made certain decisions that compiled "in
his favor". When I discovered similar things I could do in my own
environment 15 years ago, I did the same thing -- without commenting, so
of course I confused myself a year ago trying to read the code. I was
shifting something right one place and then dealing with the carry; I
kept looking for bitmask stuff later in the code when I realized after
half an hour I was simply dividing by two :-/
So now when I optimize like silly, I keep the original code commented
out, and then I optimize, and then I COMMENT my optimizations.
--
Jim Leonard (trixter at
oldskool.org)
World's largest electronic gaming project:
http://www.MobyGames.com/
A delicious slice of the demoscene:
http://www.MindCandyDVD.com/
Various oldskool PC rants and ramblings:
http://www.oldskool.org/