<?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: Optimisation &#8211; it&#8217;s sometimes needed.</title>
	<atom:link href="http://www.teamrubber.com/blog/optimisation-its-sometimes-needed/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.teamrubber.com/blog/optimisation-its-sometimes-needed/</link>
	<description>Team Rubber talks on the Internet in a blog</description>
	<lastBuildDate>Sat, 31 Jul 2010 03:38:02 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Tim Wintle</title>
		<link>http://www.teamrubber.com/blog/optimisation-its-sometimes-needed/comment-page-1/#comment-9948</link>
		<dc:creator>Tim Wintle</dc:creator>
		<pubDate>Tue, 10 Nov 2009 18:11:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.teamrubber.com/blog/?p=1004#comment-9948</guid>
		<description>... because I&#039;m leaving subclasses the option of setting _batchlist to a different (list-like) class in case I want to do lazy joins in the future.

(there is actually a descriptor called &quot;batchlist&quot; that lets you get/set the _batchlist variable that I&#039;ve missed out from this)

For the same reason, I only cast batchlist to (PyObject *) -&quot;object&quot; in Cython.

I suspect it would be faster by importing listobject.h and casting direct to the list type (Cython&#039;s generated C is actually quite messy around calling the &quot;append&quot; method in case the method doesn&#039;t exist) - but Cython makes use of a lot of gcc optimisations so the effect shouldn&#039;t be too great.</description>
		<content:encoded><![CDATA[<p>&#8230; because I&#8217;m leaving subclasses the option of setting _batchlist to a different (list-like) class in case I want to do lazy joins in the future.</p>
<p>(there is actually a descriptor called &#8220;batchlist&#8221; that lets you get/set the _batchlist variable that I&#8217;ve missed out from this)</p>
<p>For the same reason, I only cast batchlist to (PyObject *) -&#8221;object&#8221; in Cython.</p>
<p>I suspect it would be faster by importing listobject.h and casting direct to the list type (Cython&#8217;s generated C is actually quite messy around calling the &#8220;append&#8221; method in case the method doesn&#8217;t exist) &#8211; but Cython makes use of a lot of gcc optimisations so the effect shouldn&#8217;t be too great.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard Barrell</title>
		<link>http://www.teamrubber.com/blog/optimisation-its-sometimes-needed/comment-page-1/#comment-9935</link>
		<dc:creator>Richard Barrell</dc:creator>
		<pubDate>Tue, 10 Nov 2009 17:54:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.teamrubber.com/blog/?p=1004#comment-9935</guid>
		<description>The improvement there is quite impressive, especially when it&#039;s almost as great even when accessed through the subclass machinery.

Next question: since self._batchmax is known in advance, why not use an array of PyObject pointers instead of a Python list for _batchlist? That way, there&#039;d be no array resizing as extra elements get added.</description>
		<content:encoded><![CDATA[<p>The improvement there is quite impressive, especially when it&#8217;s almost as great even when accessed through the subclass machinery.</p>
<p>Next question: since self._batchmax is known in advance, why not use an array of PyObject pointers instead of a Python list for _batchlist? That way, there&#8217;d be no array resizing as extra elements get added.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
