logoalt Hacker News

coldteatoday at 10:48 AM1 replyview on HN

>Is Python's GC bad, or are there cyclic reference issues?

Both can be true. The first can even be wholly or partly due to the second.

On addition, the way it does it via RC causes fragmentation, poor locality for caches, and general slowness for mass allocations. And it's one-size-fits-all.

Java has a much larger selection to pick to finetune specific use cases, which each being far greater for that use case. And the default no-need-to-think one (G1 iirc), is already faster and better than Python's.


Replies

JackSlateurtoday at 11:47 AM

Are you not confusing GC (freeing memory) with the memory allocator ?

Memory allocator: tcmalloc, jemalloc, they are concerned with fetching (and releasing) pages of memory from the OS and allocating objects for the program

GC is only responsible for saying to the memory allocator "this object is no longer used"

(please stay focused on java)

show 2 replies