3 ms·
This was mostly just a toy project, I wouldn't recommend actually using it for anything. It's kind of depends when it comes to performance. A perfect implementa
by d4l3k 8y ago
This was mostly just a toy project, I wouldn't recommend actually using it for anything. It's kind of depends when it comes to performance. A perfect implementation would likely get better performance than all those databases there since it resides entirely in memory. I'm not sure how it currently compares.
The main thing that caused issues was that compaction of logs into the main tree conflicted with appends. This ended up causing a lot of thrashing since the compaction cycle would run a lot more than necessary.
The key point of bw-trees is that once changes have been added to the log, only the last element will change (to point to the next item). Thus, instead of trying to compact the entire log, you can compact everything but the last item to make it conflict free.