Home > Articles > Programming > C/C++

  • Print
  • + Share This
From the author of Don't Bother

Don't Bother

The most important rule when optimizing is to remember when not to bother. Most of the time, you don't need to optimize. Objective-C code is slower than statically bound C code, but not by much. People write applications in languages like Ruby and Python, which are typically much slower, and they still don't tax a modern CPU.

I recently wrote some Objective-C code that I expected to need some serious optimization effort once it got past the "make it work" stage and into the "make it work quickly" stage. When I first tried running the code, it took 0.3 seconds, most of which was spent waiting for the disk. I probably could have reduced that number to 0.25 seconds if I'd really tried hard, but it just wasn't worth the effort.

  • + Share This
  • 🔖 Save To Your Account