Bookmark Topic Watch Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
It is easier to optimize correct code
than to correct optimized code.

(Bill Harlan, 1997 - http://billharlan.com/pub/papers/A_Tirade_Against_the_Cult_of_Performance.html )

Therefore, delay performance optimization until the latest possible moment. Concentrate on good design that won't slow you down, so that you don't waste time that you later can use to optimize your system.

Then use a profiler to find the performance bottlenecks. They aren't where you think they are (even if you are an expert)! And they are easiest to find in a well designed system.

Then optimize the bottleneck you found. It's likely that the 90/10 rule applies: you can improve performance by 90% by optimizing just 10% of your code. That's again the easier the more well designed (decoupled) the code is.




Related Resources:

  • http://billharlan.com/pub/papers/A_Tirade_Against_the_Cult_of_Performance.html
  • Wiki:FirstRuleOfOptimization
  • Wiki:PrematureOptimization

    • Bookmark Topic Watch Topic
    • New Topic