Suitability for long-running text processing?
tsuraan at gmail.com
Mon Jan 8 11:13:42 EST 2007
> I just tried on my system
> (Python is using 2.9 MiB)
> >>> a = ['a' * (1 << 20) for i in xrange(300)]
> (Python is using 304.1 MiB)
> >>> del a
> (Python is using 2.9 MiB -- as before)
> And I didn't even need to tell the garbage collector to do its job. Some
It looks like the big difference between our two programs is that you have
one huge string repeated 300 times, whereas I have thousands of
four-character strings. Are small strings ever collected by python?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list