Interesting speed benchmark

Michael P. Soulier msoulier at storm.ca
Wed Jun 6 22:43:45 EDT 2001


On Thu, 7 Jun 2001 10:40:04 +1000, Delaney, Timothy <tdelaney at avaya.com>
wrote:
> 
> 1. You know *when* the object will be destroyed (in a program a trivial as
> this).
> 
> 2. Since you only ever have 2 ObjectTest instances at any time, it's highly
> likely that the memory for them will be reused for the two instances,
> meaning you don't have to continually allocate more memory. This means thr
> program is more likely to run in a smaller memory footprint - always a Good
> Thing (TM).  Tim Delaney

    This makes sense, but if Python is doing less allocation, that should also
be a time saver, no? Or did the performance increase in lazy GC just so far
outweight the benefits of less malloc() calls that it didn't matter here?

    Mike

-- 
Michael P. Soulier <msoulier at storm.ca> 
"With sufficient thrust, pigs fly just fine. However, this is not necessarily a
good idea. It is hard to be sure where they are going to land, and it could be
dangerous sitting under them as they fly overhead." -- RFC 1925



More information about the Python-list mailing list