项目深入
一个有意思的 Rust 开源项目:learned_index_lab,尝试用数学模型替代传统 B+Tree 索引
一个 Rust 开源项目,基于 PGM-Index 算法,用分段线性模型预测数据位置再做局部精确查找,无需神经网络训练和 GPU。材料称其 Benchmark 在百万级数据下相比 Rust BTreeMap 构建速度提升约 22 倍、命中查询提升约 3 倍,索引元数据占几 KB 到几十 KB,并提到可能适合时序数据库、日志检索、RocksDB SSTable 等大规模有序、读多写少场景,同时注明项目仍处于研究型阶段、不适合生产环境。适合对索引结构、存储引擎和 Rust 高性能实现感兴趣的人了解。
- 分级
- 值得看
- 是否付费
- 免费公开仓库
- 预估学习时长
- 未知
- 所属主题
- RAG 与搜索
- 收录时间
- 2026-11-03
热度
有热度
- 7 天新增 star
- +5
- 30 天新增 star
- 暂无数据
- Hacker News
- 没有
- 社区讨论
- 1 帖
项目信息
- 语言
- Rust
- 许可
- Apache-2.0
- 最近提交
- 2026-11-03
- Star
- 166
- Fork
- 5
上手方式
bash
# Clone the repository
git clone https://github.com/gilnett/learned_index_lab.git
cd learned_index_lab
# Run the unit test suite with thread isolation
cargo test --release -- --test-threads=1
# Execute the full 10-run release benchmark across all 5 targets
cargo run --release
# Run isolated benchmarks on specific targets (including Multilevel PGM)
cargo run --release -- --target multilevel,pgm --runs 10
cargo run --release -- --target pgm,multilevel --suite sosd
# Run the batch ingestion and rebuild benchmark (SSTable merge vs BTree in-place)
cargo run --release -- --batch --batch-size 100000