3 ms·
By Java 5 the average cost of an allocation in Java was already lower than heap allocation in C++, but greater than the cost of stack allocation. With escape an
by hinkley 4y ago
By Java 5 the average cost of an allocation in Java was already lower than heap allocation in C++, but greater than the cost of stack allocation. With escape analysis in Java 8 that got even better.
The biggest problem Java had was that 90’s era thinking on GC algorithms (most GC languages in the 90’s were using 80’s era GC algorithms) ran out of steam sometime around 2005, when memory availability created situations where GC pause times were impossible to hide. Cliff Click created a JVM that actually ran as a VM, in order to create a cheaper mark phase via page faulting to implement mark on write. Now we have other options.
- hayley-patton 4y agoPauseless [0]? It originally used hardware support on Azul machines to trap upon reading an unmarked pointer, but now (in the C4 generational incarnation, as well as in ZGC) this is done in software. But the other collectors use snapshot-at-the-beginning and a write barrier for concurrent marking, which originated in 1990 [1]. [0] https://www.usenix.net/legacy/events/vee05/full_papers/p46-click.pdf https://www.usenix.net/legacy/events/vee05/full_papers/p46-c... [1] https://core.ac.uk/download/pdf/39218501.pdf https://core.ac.uk/download/pdf/39218501.pdf
- hayley-patton 4y agoAnd, if one wants to be picky, Pauseless is a variation of Henry Baker's "real-time" copying collector from 1978 [2], although Pauseless uses tags corresponding to various interesting states (marked/unmarked, forwarded/unforwarded) rather than just from-space/to-space. [2] https://plover.com/~mjd/misc/hbaker-archive/RealTimeGC.html https://plover.com/~mjd/misc/hbaker-archive/RealTimeGC.html