Re:A Great Old-Timey Game-Programming Hack
by kilburn on Monday December 16, 2013 @11:20AM
(#6915686)
Your only "mistake" was to switch to a different measure when giving the percentages. Your calculations are actually fine, because you explicitly label them "speedup".
However, this can confuse a non-thorough reader because your previous measures are not about "speed"; they are about "cost" (cycles). The parent just did not realize the switch, and thought that you were claiming to have reduced "cost" (cycles) by 30%/70%, which wouldn't be true.
Re:A Great Old-Timey Game-Programming Hack
by tmoertel on Monday December 16, 2013 @11:34AM
(#6915800)
Thanks for this insight! I never would have seen it had you not told me. (I'm an engineering guy and switching between time-per-unit and units-per-time is so automatic for me that I didn't realize it wasn't automatic for everybody.)
I've updated the story to explain the calculation the first time it happens.
Thanks again!
By my calculations (which I'll machine-check now with Maxima), the 30% and 70% speed-up claims are sound. First, let's fire up Maxima:
Now let's calculate how much faster we made the row-copy code by unrolling its loop: In other words, the unrolled-loop speed is 1.3 times the original-loop speed. That's 30% faster, right?Likewise, how much faster did shaving those 1200 cycles make the tile-copy code?
I'm willing to believe that I've screwed up here, but I can't see where. Can you show me?Thanks for your help!