3 ms·
> then changes one bit on every page in the entire virtual space Yeah that sucks. Naively implemented garbage collectors have the same problem: they put the li
by matheusmoreira 3mo ago
> then changes one bit on every page in the entire virtual space
Yeah that sucks. Naively implemented garbage collectors have the same problem: they put the live and mark bits in the object itself which spreads those bits all over the address space. This leads to the garbage collector touching every single page when it scans and writes all of those bits.
The proper solution is to allocate separate bitmap pages. This dramatically improves cache efficiency. Machines always want a structure of arrays.
- evntdrvn 3mo agoI've always struggled a bit with the fact that "machines want SoA but readability/clarity/etc is easier with AoS". And wonder if it would be possible for a language to have the code representation be AoS but the implementation transparently be SoA.
- yvdriess 3mo agoPretty old, but a good example of how such an abstraction works: https://github.com/ExaScience/arrow-street https://github.com/ExaScience/arrow-street