Sam, I think you're right. The garbage collector is causing the slowdown. If I disable the garbage collector for the "memory occupied" test, the run time is very similar.
- Ryan ##### The edit: ... import gc print 'runtimes with memory occupied' gc.disable() test() gc.enable() ... ##### Performance: $ python2.6 tester2.py runtimes with memory empty dict w/o lists: 0.0598680973053 dict w lists: 0.079540014267 loading data runtimes with memory occupied dict w/o lists: 0.0467381477356 dict w lists: 0.0416531562805 On Fri, Aug 5, 2011 at 12:11 PM, Ethan Furman <[email protected]> wrote: > Joseph Burks wrote: > >> I don't have a system quite that beefy to test on at the moment to profile >> more deeply. >> > > > No kidding -- I tried the test code, and his slow case of 2.xxx took me > 243.xxx ! > > ~Ethan~ > > ______________________________**_________________ > Portland mailing list > [email protected] > http://mail.python.org/**mailman/listinfo/portland<http://mail.python.org/mailman/listinfo/portland> > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/portland/attachments/20110805/27579e3a/attachment.html> _______________________________________________ Portland mailing list [email protected] http://mail.python.org/mailman/listinfo/portland
