Optimization Trivia

I've been running various code optimization tests since on a large CPU intensive project every bit of improvement you can make in code speed translates into real-world savings in hardware purchases. So anyway, here's a two pieces of trivia:

  • The speed increase gained by moving variables from being standard data stored in RAM to being register variables (ie. stored on the CPU) is aproximately 350%.
  • The overhead for calling a function in a linked DLL versus including the code in the module itself is approximately 5% as a lower limit (ie. DLL contains only code that is actually used). If the DLL contains other functions, the overhead for using the DLL version climbs to 40% or higher.

I've done some other tests like converting some portions of the code to assembly language which is giving me decent gains as well but I'm rusty enough that I can really only do that for fairly simple stuff right now. Work, work, work… the more things I complete the more I have to do…

It's like a hydra or something…

Wow Shannon, that's really annoying! What is it, 1997 on Geocities? Retroweb is NOT cool!

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*