News for hackers. Stuff that matters.
Re:The Cost of Exception Handling by hinkley on Saturday November 12, 2022 @12:16PM (#33575000)
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.

Re:The Cost of Exception Handling by hayley-patton on Saturday November 12, 2022 @05:26PM (#33577792)
Pauseless [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-c...

[1] https://core.ac.uk/download/pdf/39218501.pdf

Re:The Cost of Exception Handling by hayley-patton on Sunday November 13, 2022 @12:01AM (#33580236)
And, 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