<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Why optimizing without profiling is inefficient</title>
	<atom:link href="http://www.taylor.se/blog/2006/11/22/why-optimizing-without-profiling-is-inefficient/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.taylor.se/blog/2006/11/22/why-optimizing-without-profiling-is-inefficient/</link>
	<description>Smart consulting</description>
	<lastBuildDate>Tue, 08 Jun 2010 05:02:39 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: mawi</title>
		<link>http://www.taylor.se/blog/2006/11/22/why-optimizing-without-profiling-is-inefficient/comment-page-1/#comment-3778</link>
		<dc:creator>mawi</dc:creator>
		<pubDate>Sat, 06 Jan 2007 14:38:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.taylor.se/blog/2006/11/22/why-optimizing-without-profiling-is-inefficient/#comment-3778</guid>
		<description>As Brad almost writes, I think there is (atleast?) an important third factor, which is developer time or initial investment cost, if you prefer. You can write optimized and readable code, but it brings a higher initial expense. Which usually is fine, enter other tradeoffs.</description>
		<content:encoded><![CDATA[<p>As Brad almost writes, I think there is (atleast?) an important third factor, which is developer time or initial investment cost, if you prefer. You can write optimized and readable code, but it brings a higher initial expense. Which usually is fine, enter other tradeoffs.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AntonioGanci</title>
		<link>http://www.taylor.se/blog/2006/11/22/why-optimizing-without-profiling-is-inefficient/comment-page-1/#comment-2729</link>
		<dc:creator>AntonioGanci</dc:creator>
		<pubDate>Wed, 29 Nov 2006 14:44:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.taylor.se/blog/2006/11/22/why-optimizing-without-profiling-is-inefficient/#comment-2729</guid>
		<description>&lt;strong&gt;Il problema delle ottimizzazioni premature...&lt;/strong&gt;

...</description>
		<content:encoded><![CDATA[<p><strong>Il problema delle ottimizzazioni premature&#8230;</strong></p>
<p>&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brad Bellomo</title>
		<link>http://www.taylor.se/blog/2006/11/22/why-optimizing-without-profiling-is-inefficient/comment-page-1/#comment-2659</link>
		<dc:creator>Brad Bellomo</dc:creator>
		<pubDate>Mon, 27 Nov 2006 20:31:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.taylor.se/blog/2006/11/22/why-optimizing-without-profiling-is-inefficient/#comment-2659</guid>
		<description>Everyone always says this is a trade off (readability-optimization), but I don&#039;t agree.  Most production code can be redesigned to be both more readable and faster.  Poor optimization will make code less readable, but can also make it slower.

Rico Mariani&#039;s top ten list is clever, but I wouldn&#039;t use Microsoft as my standard for optimization - almost every product they have is ridiculously slow.

Developers SHOULD write code trying to make everything run fast.  As long as you ignore trivialities (i.e. code with fewer comments compiles 0.0001% faster) and know how to optimize (some understanding of how the compiler, OS, and hardware work) there are very few trade offs between readability and optimization.  And telling the developers to favor readability over optimization solves these.

There is a very real trade off between developer time spent writing code and optimization.  Developers understand which is appropriate, so this isn&#039;t a problem.</description>
		<content:encoded><![CDATA[<p>Everyone always says this is a trade off (readability-optimization), but I don&#8217;t agree.  Most production code can be redesigned to be both more readable and faster.  Poor optimization will make code less readable, but can also make it slower.</p>
<p>Rico Mariani&#8217;s top ten list is clever, but I wouldn&#8217;t use Microsoft as my standard for optimization &#8211; almost every product they have is ridiculously slow.</p>
<p>Developers SHOULD write code trying to make everything run fast.  As long as you ignore trivialities (i.e. code with fewer comments compiles 0.0001% faster) and know how to optimize (some understanding of how the compiler, OS, and hardware work) there are very few trade offs between readability and optimization.  And telling the developers to favor readability over optimization solves these.</p>
<p>There is a very real trade off between developer time spent writing code and optimization.  Developers understand which is appropriate, so this isn&#8217;t a problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lloyd Budd</title>
		<link>http://www.taylor.se/blog/2006/11/22/why-optimizing-without-profiling-is-inefficient/comment-page-1/#comment-2654</link>
		<dc:creator>Lloyd Budd</dc:creator>
		<pubDate>Mon, 27 Nov 2006 19:21:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.taylor.se/blog/2006/11/22/why-optimizing-without-profiling-is-inefficient/#comment-2654</guid>
		<description>Measure early and often (automate)</description>
		<content:encoded><![CDATA[<p>Measure early and often (automate)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob Whelan</title>
		<link>http://www.taylor.se/blog/2006/11/22/why-optimizing-without-profiling-is-inefficient/comment-page-1/#comment-2562</link>
		<dc:creator>Rob Whelan</dc:creator>
		<pubDate>Sat, 25 Nov 2006 22:07:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.taylor.se/blog/2006/11/22/why-optimizing-without-profiling-is-inefficient/#comment-2562</guid>
		<description>You&#039;re absolutely correct that many developers tend to optimize prematurely -- and not just the inexperienced developers; sometimes the more experienced developers have built up a big bag of optimization &quot;tricks&quot; that they fill their code with (sometimes more to impress the junior developers than anything else!)... ignoring the fact that they&#039;re making their code far less readable for a negligible performance gain.

But it&#039;s also an awful idea to put performance and resource usage out of your mind completely until basic development is complete and you&#039;re running tests.  If you ignore scalability and performance in your basic application design, it&#039;s easy to cook up a design that&#039;s very clear and easy to follow, but will be totally unworkable in your final product; either memory demands will be enormous for even simple uses, or scaling up to thousands of users will be impossible, etc. -- and flaws in your core design are much, much harder to correct at that point.

This is where I feel the concept of elegance really comes into play in software design and code.  A very simple design can easily result in an extremely inefficient implementation; a design for optimum performance is often painfully complex; a truly elegant design (like elegant code) is easy to understand and avoids arcane tricks, but is also concise and efficient.

This is also where simple research comes into play.  To use your checkout counter example -- if you&#039;d watched a few other people check out before you built your own plan, you would have understood the general problem before you started.  Walking through a general design and making estimations on usage levels, memory requirements, etc. based on performance testing on past projects and research can be invaluable far before you have any code you can test.</description>
		<content:encoded><![CDATA[<p>You&#8217;re absolutely correct that many developers tend to optimize prematurely &#8212; and not just the inexperienced developers; sometimes the more experienced developers have built up a big bag of optimization &#8220;tricks&#8221; that they fill their code with (sometimes more to impress the junior developers than anything else!)&#8230; ignoring the fact that they&#8217;re making their code far less readable for a negligible performance gain.</p>
<p>But it&#8217;s also an awful idea to put performance and resource usage out of your mind completely until basic development is complete and you&#8217;re running tests.  If you ignore scalability and performance in your basic application design, it&#8217;s easy to cook up a design that&#8217;s very clear and easy to follow, but will be totally unworkable in your final product; either memory demands will be enormous for even simple uses, or scaling up to thousands of users will be impossible, etc. &#8212; and flaws in your core design are much, much harder to correct at that point.</p>
<p>This is where I feel the concept of elegance really comes into play in software design and code.  A very simple design can easily result in an extremely inefficient implementation; a design for optimum performance is often painfully complex; a truly elegant design (like elegant code) is easy to understand and avoids arcane tricks, but is also concise and efficient.</p>
<p>This is also where simple research comes into play.  To use your checkout counter example &#8212; if you&#8217;d watched a few other people check out before you built your own plan, you would have understood the general problem before you started.  Walking through a general design and making estimations on usage levels, memory requirements, etc. based on performance testing on past projects and research can be invaluable far before you have any code you can test.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Johannes</title>
		<link>http://www.taylor.se/blog/2006/11/22/why-optimizing-without-profiling-is-inefficient/comment-page-1/#comment-2531</link>
		<dc:creator>Johannes</dc:creator>
		<pubDate>Fri, 24 Nov 2006 22:13:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.taylor.se/blog/2006/11/22/why-optimizing-without-profiling-is-inefficient/#comment-2531</guid>
		<description>Hey, those ten optimisation rules sure has some similarities to the ten focus points of Microsoft:

1. Developers
2. Developers
3. Developers
4. Developers
5. Developers
6. Developers
7. Developers
8. Developers
9. Developers
10. Developers</description>
		<content:encoded><![CDATA[<p>Hey, those ten optimisation rules sure has some similarities to the ten focus points of Microsoft:</p>
<p>1. Developers<br />
2. Developers<br />
3. Developers<br />
4. Developers<br />
5. Developers<br />
6. Developers<br />
7. Developers<br />
8. Developers<br />
9. Developers<br />
10. Developers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andres</title>
		<link>http://www.taylor.se/blog/2006/11/22/why-optimizing-without-profiling-is-inefficient/comment-page-1/#comment-2520</link>
		<dc:creator>Andres</dc:creator>
		<pubDate>Fri, 24 Nov 2006 08:49:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.taylor.se/blog/2006/11/22/why-optimizing-without-profiling-is-inefficient/#comment-2520</guid>
		<description>Kartik:
If the performance of the system is such that it&#039;s not usable, changing the code to become faster, and less readable is ok. But it has to be a decision based on facts, not on guessing.

Cale:
I think you are right. Using an appropiate algorithm on a problem is usually the best way to get decent performance. The main point I&#039;m making is still valid though - if you have to sort a list that will never contain more than 10 items, using a fast, but advanced and hard to read algorithm might be an overkill.</description>
		<content:encoded><![CDATA[<p>Kartik:<br />
If the performance of the system is such that it&#8217;s not usable, changing the code to become faster, and less readable is ok. But it has to be a decision based on facts, not on guessing.</p>
<p>Cale:<br />
I think you are right. Using an appropiate algorithm on a problem is usually the best way to get decent performance. The main point I&#8217;m making is still valid though &#8211; if you have to sort a list that will never contain more than 10 items, using a fast, but advanced and hard to read algorithm might be an overkill.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cale</title>
		<link>http://www.taylor.se/blog/2006/11/22/why-optimizing-without-profiling-is-inefficient/comment-page-1/#comment-2515</link>
		<dc:creator>Cale</dc:creator>
		<pubDate>Fri, 24 Nov 2006 02:41:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.taylor.se/blog/2006/11/22/why-optimizing-without-profiling-is-inefficient/#comment-2515</guid>
		<description>As another point to this, when you need to optimise, it&#039;s usually better to make algorithmic optimisations where possible rather than trying to make lower-level changes to the operation of small pieces. Most often, slowdowns are caused by just using the wrong algorithm or data structures. For example, replacing an association list with a proper finite map implementation using balanced binary trees internally will usually speed things up immensely, and often provide a nicer interface to the functionality that was provided by the association lists, potentially increasing the readability of the code. The same goes for lists which are being used as sets -- if you&#039;re not just iterating over it, and instead have to do lots of things like intersections, or large amounts of element testing, you&#039;re better off with a proper set library.</description>
		<content:encoded><![CDATA[<p>As another point to this, when you need to optimise, it&#8217;s usually better to make algorithmic optimisations where possible rather than trying to make lower-level changes to the operation of small pieces. Most often, slowdowns are caused by just using the wrong algorithm or data structures. For example, replacing an association list with a proper finite map implementation using balanced binary trees internally will usually speed things up immensely, and often provide a nicer interface to the functionality that was provided by the association lists, potentially increasing the readability of the code. The same goes for lists which are being used as sets &#8212; if you&#8217;re not just iterating over it, and instead have to do lots of things like intersections, or large amounts of element testing, you&#8217;re better off with a proper set library.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kartik Agaram</title>
		<link>http://www.taylor.se/blog/2006/11/22/why-optimizing-without-profiling-is-inefficient/comment-page-1/#comment-2433</link>
		<dc:creator>Kartik Agaram</dc:creator>
		<pubDate>Thu, 23 Nov 2006 00:22:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.taylor.se/blog/2006/11/22/why-optimizing-without-profiling-is-inefficient/#comment-2433</guid>
		<description>Even if you measure and make sure a component needs optimizing, don&#039;t base the optimizations you use on just the performance improvement you get. You still have to think about readability tradeoffs. Performance improvements are transient effects, and the inevitable changes to the software or hardware stack below your application will likely reduce these improvements. But if you obtain these transient improvements using really unreadable code you will be forever saddled with it because nobody will want to take the trouble to understand it.</description>
		<content:encoded><![CDATA[<p>Even if you measure and make sure a component needs optimizing, don&#8217;t base the optimizations you use on just the performance improvement you get. You still have to think about readability tradeoffs. Performance improvements are transient effects, and the inevitable changes to the software or hardware stack below your application will likely reduce these improvements. But if you obtain these transient improvements using really unreadable code you will be forever saddled with it because nobody will want to take the trouble to understand it.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
