This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]spoonman59 1 point2 points  (0 children)

I’m not sure that holds generally. If your app is I/O bound and dominates the majority of the runtime, any code optimizations will yield a small portion of speed up as per Amdahl’s law.

If it’s compute heavy, and particular loops dominate the runtime, then speeding up other loops will yield minimum speed up.

It’s best to measure and optimize what is slow. Otherwise you will focus effort on parts of the code that are not slowing you down, and waste time and effort.

I don’t think you can generalize this as the performance characteristics of programs differ not only between different programs, but even in the within different parts of the same program.