<?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: IronPython hammers CPython when not mutating class attributes</title>
	<atom:link href="http://www.smallshire.org.uk/sufficientlysmall/2009/05/22/ironpython-hammers-cpython-when-not-mutating-class-attributes/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.smallshire.org.uk/sufficientlysmall/2009/05/22/ironpython-hammers-cpython-when-not-mutating-class-attributes/</link>
	<description>sin(x) = x</description>
	<lastBuildDate>Sat, 13 Feb 2010 19:35:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Chris</title>
		<link>http://www.smallshire.org.uk/sufficientlysmall/2009/05/22/ironpython-hammers-cpython-when-not-mutating-class-attributes/comment-page-1/#comment-2163</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Sun, 24 May 2009 18:46:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.smallshire.org.uk/sufficientlysmall/?p=171#comment-2163</guid>
		<description>The reason for CPythons sharp drop-off is a known degenerate case in the GC when you create large numbers of objects without freeing any. The GC is invoked when the total number of tracked objects goes up by more than N (depends on generation and settings), on the assumption that if you&#039;re creating that many more objects than you are destroying, then you probably have some cycles that could use cleaning up.

The end result in this sort of object creation pattern, though, is that the cyclic GC is being invoked on every object, thus causing an exponential slowdown in object creation time.

This generally plays out pretty well in practice. It tends to bite people making benchmarks a lot though. CPython 2.7 has some changes to make this heuristic smarter. IronPython and Jython of course rely on the platforms traditional GC rather than CPythons cycle collector and don&#039;t have this specific issue.</description>
		<content:encoded><![CDATA[<p>The reason for CPythons sharp drop-off is a known degenerate case in the GC when you create large numbers of objects without freeing any. The GC is invoked when the total number of tracked objects goes up by more than N (depends on generation and settings), on the assumption that if you&#8217;re creating that many more objects than you are destroying, then you probably have some cycles that could use cleaning up.</p>
<p>The end result in this sort of object creation pattern, though, is that the cyclic GC is being invoked on every object, thus causing an exponential slowdown in object creation time.</p>
<p>This generally plays out pretty well in practice. It tends to bite people making benchmarks a lot though. CPython 2.7 has some changes to make this heuristic smarter. IronPython and Jython of course rely on the platforms traditional GC rather than CPythons cycle collector and don&#8217;t have this specific issue.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hans Roman</title>
		<link>http://www.smallshire.org.uk/sufficientlysmall/2009/05/22/ironpython-hammers-cpython-when-not-mutating-class-attributes/comment-page-1/#comment-2110</link>
		<dc:creator>Hans Roman</dc:creator>
		<pubDate>Sat, 23 May 2009 04:01:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.smallshire.org.uk/sufficientlysmall/?p=171#comment-2110</guid>
		<description>Nice! But I would like to see this test with Mono too.</description>
		<content:encoded><![CDATA[<p>Nice! But I would like to see this test with Mono too.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aguy</title>
		<link>http://www.smallshire.org.uk/sufficientlysmall/2009/05/22/ironpython-hammers-cpython-when-not-mutating-class-attributes/comment-page-1/#comment-2107</link>
		<dc:creator>aguy</dc:creator>
		<pubDate>Sat, 23 May 2009 03:14:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.smallshire.org.uk/sufficientlysmall/?p=171#comment-2107</guid>
		<description>haha teaches me to read the other comments first.  nice.</description>
		<content:encoded><![CDATA[<p>haha teaches me to read the other comments first.  nice.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aguy</title>
		<link>http://www.smallshire.org.uk/sufficientlysmall/2009/05/22/ironpython-hammers-cpython-when-not-mutating-class-attributes/comment-page-1/#comment-2106</link>
		<dc:creator>aguy</dc:creator>
		<pubDate>Sat, 23 May 2009 03:13:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.smallshire.org.uk/sufficientlysmall/?p=171#comment-2106</guid>
		<description>read this and the previous, v. interesting read.  i like the conclusions.  wonder where class updates are on the list of things to do.</description>
		<content:encoded><![CDATA[<p>read this and the previous, v. interesting read.  i like the conclusions.  wonder where class updates are on the list of things to do.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mycall</title>
		<link>http://www.smallshire.org.uk/sufficientlysmall/2009/05/22/ironpython-hammers-cpython-when-not-mutating-class-attributes/comment-page-1/#comment-2101</link>
		<dc:creator>mycall</dc:creator>
		<pubDate>Sat, 23 May 2009 00:51:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.smallshire.org.uk/sufficientlysmall/?p=171#comment-2101</guid>
		<description>Nick Craig-Wood made a valid point on your previous post which you haven&#039;t tested for yet.. try disabling the python garbage collector while making the tree.</description>
		<content:encoded><![CDATA[<p>Nick Craig-Wood made a valid point on your previous post which you haven&#8217;t tested for yet.. try disabling the python garbage collector while making the tree.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Curt Hagenlocher</title>
		<link>http://www.smallshire.org.uk/sufficientlysmall/2009/05/22/ironpython-hammers-cpython-when-not-mutating-class-attributes/comment-page-1/#comment-2096</link>
		<dc:creator>Curt Hagenlocher</dc:creator>
		<pubDate>Fri, 22 May 2009 22:39:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.smallshire.org.uk/sufficientlysmall/?p=171#comment-2096</guid>
		<description>Nice! Dino&#039;s now changed the way we generate code in this case, so you won&#039;t have to change any of your compiler code if you&#039;re willing to pull the IronPython source from CodePlex and build it yourself. He&#039;s also written about the issue on his blog at http://blogs.msdn.com/dinoviehland/archive/2009/05/22/on-performance.aspx</description>
		<content:encoded><![CDATA[<p>Nice! Dino&#8217;s now changed the way we generate code in this case, so you won&#8217;t have to change any of your compiler code if you&#8217;re willing to pull the IronPython source from CodePlex and build it yourself. He&#8217;s also written about the issue on his blog at <a href="http://blogs.msdn.com/dinoviehland/archive/2009/05/22/on-performance.aspx" rel="nofollow">http://blogs.msdn.com/dinoviehland/archive/2009/05/22/on-performance.aspx</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
