Live data from Hacker News

Sorted string tables (SST) from first principles

bitsxpages.com

11–12 of 12 posts

Re: Sorted string tables (SST) from first principles

#11
post #9
post #4

see https://gitlab.com/mac3n/ksip binary search on mmpa'd sorted text files no index needed

this is pretty different but reminds me of https://en.wikipedia.org/wiki/Bitcask - if you're storing it all in memory why not just use a hash index?

The trick is, it's not all in memory - it's a memory-mapped file If you look at the cache (with `fincore` or similar) you'll see that the buinary search only loads the pages it examines, roughly logarithmetic in the file size.

And a text file is the most useful general format - easy to write, easy to process with standard tools.

I've used this in the past on data sets of hundreds of millions of lines, maybe billions.

It's also true that you could use a memory-mapped indexed file for faster searches - I've used sqlite for this.

Re: Sorted string tables (SST) from first principles

#12
post #6

The diagrams on this page are stunning! My only complaint is leaving the close/maximize/minimize buttons in the top left was unnecessary but this is the kind of clarity I always strive for (and fail to achieve) every time I make diagrams. Did you use a tool to create them, and if so, what is that tool?

Thanks! I use https://monodraw.helftone.com/ which is my favorite one-time-purchase software of all time. I definitely agree the buttons on the top left are unnecessary but ... it's cute and it makes me happy so I can't help it. Maybe I'll come up with a different style for the next blog

Thanks for sharing. I also like the diagrams for this.
Post reply on HN