3 ms·
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
by saosebastiao 11y ago
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.
- sievebrain 11y agoDeterministic 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=PLX8CzqL3ArzUo2dtMurvpUTAaujPMeuuU&index=12 https://www.youtube.com/watch?v=3JphI1Z0MTk&list=PLX8CzqL3Ar... http://www.oracle.com/technetwork/java/jvmls2015-wimmer-2637907.pdf http://www.oracle.com/technetwork/java/jvmls2015-wimmer-2637...