Sam,<div><br></div><div>I think you&#39;re right.  The garbage collector is causing the slowdown.  If I disable the garbage collector for the &quot;memory occupied&quot; test, the run time is very similar.</div><div><br></div>
<div>- Ryan</div><div><br></div><div><br></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">##### The edit:</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">...</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace" color="#009900">import gc</font></div><div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">print &#39;runtimes with memory occupied&#39;</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace" color="#009900">gc.disable()</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">test()</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace" color="#009900">gc.enable()</font></div>
</div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">...</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><br></font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">##### Performance:</font></div>
<div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">$ python2.6 tester2.py</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">runtimes with memory empty</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">dict w/o lists: 0.0598680973053</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">dict w lists:   0.079540014267</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">loading data</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">runtimes with memory occupied</font></div><div>
<font class="Apple-style-span" face="&#39;courier new&#39;, monospace">dict w/o lists: 0.0467381477356</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace" color="#009900">dict w lists:   0.0416531562805</font></div>
</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br><div class="gmail_quote">On Fri, Aug 5, 2011 at 12:11 PM, Ethan Furman <span dir="ltr">&lt;<a href="mailto:ethan@stoneleaf.us">ethan@stoneleaf.us</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">Joseph Burks wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I don&#39;t have a system quite that beefy to test on at the moment to profile<br>
more deeply.<br>
</blockquote>
<br>
<br></div>
No kidding -- I tried the test code, and his slow case of 2.xxx took me 243.xxx !<br><font color="#888888">
<br>
~Ethan~</font><div><div></div><div class="h5"><br>
______________________________<u></u>_________________<br>
Portland mailing list<br>
<a href="mailto:Portland@python.org" target="_blank">Portland@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/portland" target="_blank">http://mail.python.org/<u></u>mailman/listinfo/portland</a><br>
</div></div></blockquote></div><br></div>