Software development, .Net, SQL Server, TDD, Agile, Community and other Odds and Sods
Mitch Wheat has been working as a professional programmer since 1984, graduating with a honours degree in Mathematics from Warwick University, UK in 1986. He moved to Perth in 1995, having worked in software houses in London and Rotterdam. He has worked in the areas of mining, electronics, research, defence, financial, GIS, telecommunications, engineering, and information management. Mitch has worked mainly with Microsoft technologies (since Windows version 3.0) but has also used UNIX. He holds the following Microsoft certifications: MCPD (Web and Windows) using C# and SQL Server MCITP (Admin and Developer). His preferred development environment is C#, .Net Framework and SQL Server. Mitch has worked as an independent consultant for the last 10 years, and is currently involved with helping teams improve their Software Development Life Cycle. His areas of special interest lie in performance tuning
Friday, September 29, 2006
Do You Suffer from Premature Optimisation?
Randall Hyde published a paper on The Fallacy of Premature Optimisation back in July 2006, which discusses the mindset required to create efficient code, and how it has been misconstrued:
Observation #1: "Premature optimization is the root of all evil" has become "Optimization is the root of all evil." Therefore, optimization should be avoided.This is similar to an often misquoted biblical quote, “The love of money is the root of all evil” (which is misquoted as “Money is the root of all evil”).
What Hoare and Knuth are really saying is that software engineers should worry about other issues (such as good algorithm design and good implementations of those algorithms) before they worry about micro-optimizations such as how many CPU cycles a particular statement consumes.
This is something I try to explain to all junior programmers, and why it is important to have at least a basic understanding of algorithm order complexity, e.g. O(N ²) versus O(NlogN)
I saw this article via Rico Marini’s blog.
MSN, Email: mitch døt wheat at gmail.com