5 ms·
Speaking about JVM garbage collection, why isn't automatic reference counting being used instead of traditional garbage collection? It seems kind of like the be
by pak9rabid 6y ago
Speaking about JVM garbage collection, why isn't automatic reference counting being used instead of traditional garbage collection? It seems kind of like the best of both words in a automatic memory-managed environment of providing safety as well as performance. Languages like Objective-C and Swift have proven that this is very viable. I wonder what's keeping the JVM from adopting it?
- winrid 6y agoBecause allocation is slower with just reference counting, and the JVM is all about throughput. The downside is predictability, but newer memory managers are almost fully concurrent so soon it may not matter.
- pak9rabid 6y agoInteresting. Is the slower allocation due to it having to increase a reference count somewhere, or is there more to it than that?
- pjmlp 6y agoBecause it is way slower despite cargo cult about its performance, and any optimization algorithms, just turn reference counting into poor man's tracing GC. https://github.com/ixy-languages/ixy.swift/blob/master/performance/README.md https://github.com/ixy-languages/ixy.swift/blob/master/perfo...