3 ms·
Regarding the quote below... I don't get it. Cells are a linked list spread randomly throughout your address space. Processors don't love that at all. "A cell
by justinhj 17y ago
Regarding the quote below... I don't get it. Cells are a linked list spread randomly throughout your address space. Processors don't love that at all.
"A cell is a cell in the same way it was with the original Lisp, consisting on a head and the rest, that is, a CAR part (which may be either a number, a symbol, or a pointer to another cell), and a CDR part (also a number, symbol or cell).
As a consequence, it is incredibly memory efficient, and there is little to none memory fragmentation. Processors cache "loves" our interpreter."
- pmjordan 17y agoLet's just say I wouldn't use the spread of allocations across address space as a PRNG. Depends on your allocator of course, but you should normally see some fairly linear patterns. The allocator can be very simple if all (or almost all) allocations are the same size, so you can easily optimise for cache efficiency. I suspect the cache angle they're playing up refers to memory footprint of each cell. I don't know how big their cells are, they could be anything from 2 machine words up. Integers are supposedly directly represented, and if they've embedded their GC liveness info into spare bits (or stored it elsewhere entirely) then that makes it extremely compact and thus cache friendly.