Sunday, March 01, 2009

Software Performance Consideration while Coding

Some tips when you write a code (an excerpt from Eric Lippert's Blog):
  • Set meaningful, measurable, customer-focused goals.
  • Write the code to be as clear and correct as possible.
  • Carefully measure your performance against your goals.
  • Did you meet your goal? Great! Don't waste any time on performance analysis. Spend your valuable time on features, documentation, bug fixing, robustness, security, whatever.
  • If you did not meet your goal, use tools to discover what the worst-performing fixable thing is, and fix it.

It tells how to walk on a blur trade-off between ‘correct’ and ‘preferment’ code. Success in the industry depends upon lot other factor and people just want workable code. Unnecessarily fast code doesn’t create any value of customer and time taken to think about or writing code is merely a waste in this hurry-burry software industry. Popularity of framework like .NET and Java are greatest example of it. Even the master, Donald Knuth, has said:
"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil."

No comments: