4 ms·
A problem with persistent data structures is that they're memory-hungry. Combining that with the overhead of a garbage collector... I think such structures are
by dmpk2k 13y ago
A problem with persistent data structures is that they're memory-hungry. Combining that with the overhead of a garbage collector...
I think such structures are useful (and nice!) in some circumstances, but as a general solution for efficient system software they're just too hungry to be useful, at least for now. Having useful memory cut to 1/6th (if I'm being generous) or lower is painful, and god forbid the operating system decides it's time to start swapping out pages. The effective memory bandwidth will take a kick in the pants too.
No silver bullet, &c.
- pron 13y agoMy main issue with persistent ds is that they don't have good (CPU) cache behavior on updates. They don't necessarily consume that much memory -- a 32-way trie is quite memory efficient -- as long as the refs to the old versions die soon. But even mutable concurrent data structures need to keep the old version around, albeit momentarily (hopefully), as they CAS in a new node (depending on the nature of the data structure) in the presence of concurrent readers. Achieving even that with simple ref-counting is not trivial.