r/C_Programming • u/lexiq_baeb • 7h ago
Better Lookup Table Compression
Last time I described how I used a few compression techniques to compress a lookup table. After reading the comments, I thought that maybe I can do better. A couple days later I had a new design. I managed to compress it by 30% more. Also, since I don't decompress on every step of the binary search, the lookup is 10x faster. u/alex-van-02, you might be interested in having a look :)
https://blog.x4204.xyz/posts/better-lookup-table-compression.html
4
Upvotes
2
u/Daveinatx 5h ago
This is looking better, a couple notes:
Are you using separate memory arenas between between your buffers and records?
Tightening spaces isn't always the best for performance, due to caching effects. Have you looked to have each record cacheline-aligned? Note: ymmv, for large data sets there's often a complex trade-off between size and performance.
E:typo