News for hackers. Stuff that matters.
Re:How can List be faster than native arrays? (2018) by AlexanderDhoore on Sunday August 04, 2019 @02:14PM (#20608244)
As far as I know this is an RRB vector.

Here's the original paper: https://infoscience.epfl.ch/record/213452/files/rrbvector.pd...

A rust implementation: https://docs.rs/im/13.0.0/im/

C++ implementation: https://github.com/arximboldi/immer

The rust implemenation does a cool trick where the data is only copied when it is shared. If you are the sole owner of the data structure it will simply mutate it in place. So you don't lose any performance. But once you share it, it becomes an immutable functional data structure. See https://docs.rs/im/13.0.0/im/#in-place-mutation

There are no comments on this comment yet.