[Python-Dev] Linus on garbage collection (original) (raw)
Antoine Pitrou solipsis at pitrou.net
Fri May 6 17:33:51 CEST 2011
- Previous message: [Python-Dev] Linus on garbage collection
- Next message: [Python-Dev] Linus on garbage collection
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Fri, 06 May 2011 15:46:08 +0100 Mark Shannon <marks at dcs.gla.ac.uk> wrote:
Neal Becker wrote: > http://gcc.gnu.org/ml/gcc/2002-08/msg00552.html > Being famous does not necessarily make you right. OS kernels are pretty atypical software, even if Linus is right about Linux, it doesn't apply to Python. I have empirical evidence, not opinion, that PyPy and my own HotPy are a lot faster (x5 or better) on Unladen Swallow's gcbench benchmark (which stresses the memory management subsystem). (Note that gcbench does not introduce any cycles, so its being easy on CPython) In fact, for gcbench CPython spends over twice as long in the cycle-collector as HotPy takes in total!
The thing is, it would be easy to change our collection heuristics so that the cycle collector gets called less often (actually, you can already do so using gc.set_threshold, IIRC). Something which is much more delicate for a "full" GC, where it would grow memory consumption a lot.
Regards
Antoine.
- Previous message: [Python-Dev] Linus on garbage collection
- Next message: [Python-Dev] Linus on garbage collection
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]