4 ms·
I'm not sure it's the best way to store sets. It's seems like potentially doing a pointer dereference per bit is quite an overhead. It would be 8 times faster (
by DanWaterworth 15y ago
I'm not sure it's the best way to store sets. It's seems like potentially doing a pointer dereference per bit is quite an overhead. It would be 8 times faster (for dense sets) to have a crit-byte tree. Though then obviously if you did that naively, there would be a huge associated storage cost. To mitigate that, you can do what AMTs do and have a bitmap per node followed by an array of pointers.
- gsg 15y agoCrit-bit trees don't branch per bit, they branch per differing bit. Much more efficient for most data sets.
- DanWaterworth 15y agoI know that thanks