r/programming • • Oct 16 '26

Learned Index Lab: Replacing B-Trees with streaming linear models in pure Rust (-99% RAM, 3x faster)

https://github.com/gilnett/learned_index_lab

Instead of pointer-chasing through B-Tree node hierarchies, this index models the key distribution using streaming piecewise linear regression with strict epsilon error bounds.

Lookups compute positions directly on the CPU ALU before a local L1 cache search, reducing memory by 99% and cutting latency by 3x.

191 Upvotes

49 comments sorted by

View all comments

Show parent comment

-16

u/HommeMusical Oct 16 '26

You will be left behind.

7

u/Pdan4 Oct 16 '26

By what or who, exactly?

7

u/The_Northern_Light Oct 17 '26

By people whose code uses 99% less ram and runs 3x as fast, presumably

1

u/Pdan4 Oct 17 '26

If that were the only output from generative AI (or, even, if speed and ram usage were the only criteria I thought people should care about) I would say that's a fair assessment. Alas...