How is garbage collection done in PyPy? — The GC implementation can be chosen at runtime. It's pluggable. PyPy uses mark and sweep, and generational gc optimization. Marked objects are promoted from the nursery to an older generation. PyPy uses incremental garbage collection, where major collection is split into multiple passes, each lasting only a few milliseconds.