1. 4
  1.  

  2. 1

    It’d be really interesting to measure the speed benefits of the locality and bump allocation that compacting at least the nursery gets you in Java. I don’t know how you could cheaply do a controlled experiment, though. The popular fully-non-moving GCs I know of are tied to deeply different environments like WebKit’s Riptide for JS and Go’s GC.

    The experiment here is really “are totally random accesses in a large array slower than the sequential access we get here after Java GC?” But ‘totally random’ is an extreme; the allocators in non-moving environments don’t usually hand out totally random addresses, and often (as the post alludes to) they allow structures where your data is in-line rather than pointed to via object references, so an array like the one in the benchmark could have objects in logical order even before GC.

    Which, again, is not to discount the upsides of the object references + compacting approach. I’d love to see its effects on various workloads if someone constructed the right tests. I just don’t immediately know an easy way to build that test.