In this post, we delve into implementing a static search tree (S+ tree) for high-throughput searching of sorted data, optimizing code from Algorithmica. By focusing on ‘future work’ ideas and diving into assembly code, we aim to enhance throughput using batching. The main goal is to support queries efficiently, with a focus on optimizing throughput in terms of queries answered per second. We compare the efficiency of binary search and the Eytzinger layout, highlighting the benefits of prefetching cache lines for improved performance. The post introduces S-trees, a middle ground between B-trees and Eytzinger layout, optimizing memory usage and search efficiency. The author provides code snippets for implementing S-trees for searching.
https://curiouscoding.nl/posts/static-search-tree/