Writing the Fastest GBDT Library in Rust
summary
Rust implementation of a gradient boosted decision tree library that trains faster than similar C/C++ libraries, with concrete wins from microoptimizations: parallelizing over features and row chunks with rayon, spotting a cache-murdering indirect access with cargo-flamegraph and inspecting assembly with cargo-asm, eliminating a runtime multiply by casting to a contiguous slice, adding x86_64 prefetch intrinsics, removing bounds checks with get_unchecked, and unsafely asserting nonoverlapping accesses to safely parallelize—benchmarks show significant end-to-end speedup.
AI-written summary · about
chapters (8)
- 0:00Introduction to Tangram
- 0:44Understanding decision trees
- 1:56Parallelizing with Rayon
- 3:19Profiling with flame graphs
- 5:02Optimizing assembly code
- 6:48Compiler intrinsics
- 7:36Safe and unsafe optimizations
- 9:17Results and conclusion
related talks
31mBenchmarking and Optimization of Rust Libraries
38mCatBoost - the new generation of gradient boosting
40mRust’s approach of getting things right
01h 33mCrunching Your Data with CatBoost - the New Gradient Boosting Library
59mParallel Programming in Rust: Techniques for Blazing Speed
20mData-oriented Design for Differentiable, Probabilistic Programming
16mEmpowering Fearless Data Engineering
21mExtending the horizons of R with Rust
