Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
What? ===== Rather than using Rust's built-in allocator, this changes to using mimalloc. In looking to squeeze out further performance, benchmarks across three private Rails repositories (of varying sizes) as well as Discourse cover Rust's built-in allocator, jemalloc, and mimalloc. In starting with jemallic, the benchmarks looked quite promising: | | Rust | jemalloc | speedup vs Rust | | Codebase 1 | 1389 | 906 | 53% | | Codebase 2 | 2172 | 1541 | 41% | | Codebase 3 | 59005 | 57340 | 3% | | discourse | 2092 | 1490 | 40% | All times are measured in milliseconds and benchmarks are run with [bench](https://hackage.haskell.org/package/bench) on release mode. mimalloc resulted in even further performance gains: | | Rust | mimalloc | speedup vs Rust | speedup vs jemalloc | | Codebase 1 | 1389 | 828 | 67% | 9% | | Codebase 2 | 2172 | 1264 | 72% | 22% | | Codebase 3 | 59005 | 40176 | 47% | 43% | | discourse | 2092 | 1403 | 49% | 6% | Across the board, mimalloc presented a ~45% to 70% speedup over the Rust allocator. In each of these samples, mimalloc also outperformed jemalloc, especially with larger codebases (either number of tokens or number of files).
- Loading branch information