Earlier quoted context omitted.
Do we mean different things by "merge join" and "nested loop join" ? For me "merge join" is O(n) (but requires the data to be sorted by key) whereas "nested loop join" is O(n^2).
Wouldn't you at least be looking at nlog(n) for the sort in the merge join?
Ask HN: What are some cool but obscure data structures you know about?
151–160 of 772 posts
Re: Ask HN: What are some cool but obscure data structures you know about?
#152If you like these kinds of data structures, the Database Internals [3] book has a good introduction and explanation of a handful of BTree optimizations like this.
1: https://www.microsoft.com/en-us/research/wp-content/uploads/...
2: https://www.cs.cmu.edu/~huanche1/publications/open_bwtree.pd...
Re: Ask HN: What are some cool but obscure data structures you know about?
#153Re: Ask HN: What are some cool but obscure data structures you know about?
#154(Fantastic post idea OP. One of the best I've ever seen :D) Related to bloom filters, xor filters are faster and more memory efficient, but immutable. HyperLogLog is an efficient way to estimate cardinality. Coolest thing I've learned recently was Y-fast trie. If your dataset M is bounded integers (say, the set of all 128 bit numbers), you get membership, predecessor, or successor queries in log log time, not log, li…
Discovered HLL because it's used in ClickHouse, which employ a ton of cool but obscure data structure.
Re: Ask HN: What are some cool but obscure data structures you know about?
#155Sparse sets. They're often used in Entity Component System architectures since you have O(1) add/remove/find, & O(n) iteration. Iterations are also packed, which is a bonus for cache efficiency. Can be difficult to implement well, but the concept is simple and a neat example of a useful specialty data structure. Take a look at https://github.com/skypjack/entt
Re: Ask HN: What are some cool but obscure data structures you know about?
#156A sorted list. It's often cheaper to sort the list after each change, then to search the whole list. Especially when you do collision detection in 3d... (maybe not so obscure, but at least underestimated) When I pair my socks I first place them in color order :)
Re: Ask HN: What are some cool but obscure data structures you know about?
#157Fountain Codes: reconstruct data from random selection of packets. Was deeply patent encumbered until recently. https://en.m.wikipedia.org/wiki/Fountain_code
Re: Ask HN: What are some cool but obscure data structures you know about?
#158Structures good for Geospatial information like rtrees, quadtrees. https://en.m.wikipedia.org/wiki/R-tree Also concurrent data structures. https://youtu.be/jcqGSehrMGU