Re:Java garbage collection can be really slow
by saosebastiao on Saturday April 23, 2016 @01:54PM
(#11556576)
That is news to me (thanks for the clarification), but unless I'm misunderstanding you, escape analysis is only for block scoped allocations. It doesn't perform any optimizations for large and/or long lived objects so they can bypass expensive large heap mark stages, and it doesn't allow for deterministic destructor interfaces. As far as I can tell, the only industrial GC language out there attempting to do this sort of thing is Swift.
[ Parent
| on HN ]
Re:Java garbage collection can be really slow
by sievebrain on Sunday April 24, 2016 @06:37AM
(#11559220)
Deterministic destruction RAII style is handled in GCd languages with try-with-resources or using type constructs.
Modern collectors like G1 don't do full mark/sweeps of the entire heap in normal operation - only in rare cases like if you request a memory profile, or if the entire process runs out of RAM and needs to do a hard stop. And reference counting isn't something you can just automatically do due to the presence of cycles.
Notwithstanding these things, you may be interested in Graal, and specifically this talk on automatic region allocation:
https://www.youtube.com/watch?v=3JphI1Z0MTk&list=PLX8CzqL3Ar...
http://www.oracle.com/technetwork/java/jvmls2015-wimmer-2637...