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…

Dubiously related posts:

  1. Colour Sequencing / Combinatorics Tool Caitlin needed a tool for creating lists of every possible...
  2. Multi-threading OK, I've got this stupid thing sort of working... It's...
  3. Optimization (not SEO though) The software that I use for maintaining the BME site...
  4. Trivia to think about Q: What company made more money than any other...
  5. Trivia This may be old news to some, but I came...

Post a Comment

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