<?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: 10 Python Optimization Tips and Issues</title>
	<atom:link href="http://www.algorithm.co.il/blogs/programming/python/10-python-optimization-tips-and-issues/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.algorithm.co.il/blogs/computer-science/10-python-optimization-tips-and-issues/</link>
	<description>Algorithms, for the heck of it</description>
	<lastBuildDate>Tue, 21 Jun 2011 21:07:08 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
	<item>
		<title>By: Luke Maurits &#187; Blog Archive &#187; Python vs C for performance</title>
		<link>http://www.algorithm.co.il/blogs/computer-science/10-python-optimization-tips-and-issues/#comment-250</link>
		<dc:creator>Luke Maurits &#187; Blog Archive &#187; Python vs C for performance</dc:creator>
		<pubDate>Thu, 22 Apr 2010 03:11:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.algorithm.co.il/blogs/?p=373#comment-250</guid>
		<description>[...] Reddit today I came across a fairly decent article on Python optimization tips and issues, which comes across fairly heavily in favour of the idea that by being careful and knowing what [...]</description>
		<content:encoded><![CDATA[<p>[...] Reddit today I came across a fairly decent article on Python optimization tips and issues, which comes across fairly heavily in favour of the idea that by being careful and knowing what [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paddy3118</title>
		<link>http://www.algorithm.co.il/blogs/computer-science/10-python-optimization-tips-and-issues/#comment-249</link>
		<dc:creator>Paddy3118</dc:creator>
		<pubDate>Wed, 23 Sep 2009 18:59:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.algorithm.co.il/blogs/?p=373#comment-249</guid>
		<description>Benny,
It might be best to design first for correctness and then address any performance issues.</description>
		<content:encoded><![CDATA[<p>Benny,<br />
It might be best to design first for correctness and then address any performance issues.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Benny Daon</title>
		<link>http://www.algorithm.co.il/blogs/computer-science/10-python-optimization-tips-and-issues/#comment-248</link>
		<dc:creator>Benny Daon</dc:creator>
		<pubDate>Wed, 23 Sep 2009 06:10:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.algorithm.co.il/blogs/?p=373#comment-248</guid>
		<description>Great post, thanks.

I guess the bottom line is that an algorithm should be designed for performance and later use profiling to improve implementation speed.</description>
		<content:encoded><![CDATA[<p>Great post, thanks.</p>
<p>I guess the bottom line is that an algorithm should be designed for performance and later use profiling to improve implementation speed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vaibhav Mallya</title>
		<link>http://www.algorithm.co.il/blogs/computer-science/10-python-optimization-tips-and-issues/#comment-247</link>
		<dc:creator>Vaibhav Mallya</dc:creator>
		<pubDate>Tue, 22 Sep 2009 18:56:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.algorithm.co.il/blogs/?p=373#comment-247</guid>
		<description>One cheap trick you can also use is to cache a method call in a tight loop. Method lookups can be expensive, so for example in:

&gt; for i in xrange(1000):
&gt;      myobj.compute(i)

you can eliminate the lookup:

&gt; compute = myobj.compute
&gt; for i in xrange(1000):
&gt;      compute(i)</description>
		<content:encoded><![CDATA[<p>One cheap trick you can also use is to cache a method call in a tight loop. Method lookups can be expensive, so for example in:</p>
<p>&gt; for i in xrange(1000):<br />
&gt;      myobj.compute(i)</p>
<p>you can eliminate the lookup:</p>
<p>&gt; compute = myobj.compute<br />
&gt; for i in xrange(1000):<br />
&gt;      compute(i)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: garg</title>
		<link>http://www.algorithm.co.il/blogs/computer-science/10-python-optimization-tips-and-issues/#comment-246</link>
		<dc:creator>garg</dc:creator>
		<pubDate>Tue, 22 Sep 2009 17:05:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.algorithm.co.il/blogs/?p=373#comment-246</guid>
		<description>Thanks for posting this. I found it to be very practical and helpful.</description>
		<content:encoded><![CDATA[<p>Thanks for posting this. I found it to be very practical and helpful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paddy3118</title>
		<link>http://www.algorithm.co.il/blogs/computer-science/10-python-optimization-tips-and-issues/#comment-245</link>
		<dc:creator>Paddy3118</dc:creator>
		<pubDate>Tue, 22 Sep 2009 02:30:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.algorithm.co.il/blogs/?p=373#comment-245</guid>
		<description>One more...
Understand where your program fits. It may be easier to optimise a cooperating program rather than the current one, to gain the performance gain needed for the whole system.

- Paddy.</description>
		<content:encoded><![CDATA[<p>One more&#8230;<br />
Understand where your program fits. It may be easier to optimise a cooperating program rather than the current one, to gain the performance gain needed for the whole system.</p>
<p>- Paddy.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: yuval</title>
		<link>http://www.algorithm.co.il/blogs/computer-science/10-python-optimization-tips-and-issues/#comment-244</link>
		<dc:creator>yuval</dc:creator>
		<pubDate>Mon, 21 Sep 2009 22:42:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.algorithm.co.il/blogs/?p=373#comment-244</guid>
		<description>Really nice info, I agree with everything. I&#039;ve met lazy people (as programmers should be) that skip the profiling step and just guess where they need to optimize so I&#039;d like to +1 how important it is. Not to mention it&#039;s easy:

import profile
profile.run(&quot;any_python_expression&quot;)

where usually you&#039;d replace any_python_expression with a call to your main function...</description>
		<content:encoded><![CDATA[<p>Really nice info, I agree with everything. I&#8217;ve met lazy people (as programmers should be) that skip the profiling step and just guess where they need to optimize so I&#8217;d like to +1 how important it is. Not to mention it&#8217;s easy:</p>
<p>import profile<br />
profile.run(&#8220;any_python_expression&#8221;)</p>
<p>where usually you&#8217;d replace any_python_expression with a call to your main function&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

