A couple garbage collector questions

Tim Peters tim.one at home.com
Thu Apr 5 01:47:28 EDT 2001


[Neil Schemenauer]
> I also had to disable the integer, float, and method object
> freelists [in order to give the BDW collector a fair trial]

[and later]
> To be fair I re-ran pystone with the freelists disabled for the
> referencing counting interpreter (source from CVS):

That's a false fairness, though.  As Boehm would tell you (in fact, I think
he *did* just a few months ago <wink>), the BDW scheme *should* work best
without Python managing its own freelists.  But Python's refcount scheme
works best with managing its own freelists (indeed, that's why they're
there!).  Fairness consists of doing the best thing for each scheme, even
when they differ (comparing BDW to a castrated version of Python's current
scheme neither measures reality nor gives BDW a worthy target to shoot for
<wink>).

Disabling the freelists would be a more interesting experiment when using
Vladimir's pymalloc allocator, because (a) pymalloc was designed to favor
small allocations; and (b) the platform malloc often sucks.  Python uses
freelists primarily because the effect of #b is so damning across platforms
("malloc sucks on yet another platform?  OK, let's try not using malloc at
all ...").

getting-to-reuse-trash-instantly-is-the-norm-under-python-rc-
    not-the-exception-ly y'rs  - tim





More information about the Python-list mailing list