next.js
fd27e588 - perf(turbopack): Update rustc-hash from 1.1.0 to 2.1.0 (#75531)

Commit
324 days ago
perf(turbopack): Update rustc-hash from 1.1.0 to 2.1.0 (#75531) > Replace hash with faster and better finalized hash. This replaces the previous "fxhash" algorithm originating in Firefox with a custom hasher designed and implemented by Orson Peters (orlp). It was measured to have slightly better performance for rustc, has better theoretical properties and also includes a significantly better string hasher. https://github.com/rust-lang/rustc-hash/blob/master/CHANGELOG.md # Benchmarks Any perf difference either way is too small to be easily measured. Benchmarks here technically show a tiny regression, but that's well within the run-to-run variance I've observed. ## rustc-hash 1.1.0 ``` $ hyperfine --warmup 1 --runs 5 --prepare 'rm -rf .next' 'TURBOPACK=1 TURBOPACK_BUILD=1 TURBO_ENGINE_READ_ONLY=1 pnpm next build --experimental-build-mode=compile' Benchmark 1: TURBOPACK=1 TURBOPACK_BUILD=1 TURBO_ENGINE_READ_ONLY=1 pnpm next build --experimental-build-mode=compile Time (mean ± σ): 26.736 s ± 0.294 s [User: 122.811 s, System: 15.908 s] Range (min … max): 26.340 s … 27.165 s 5 runs ``` ## rustc-hash 2.1.0 ``` $ hyperfine --warmup 1 --runs 5 --prepare 'rm -rf .next' 'TURBOPACK=1 TURBOPACK_BUILD=1 TURBO_ENGINE_READ_ONLY=1 pnpm next build --experimental-build-mode=compile' Benchmark 1: TURBOPACK=1 TURBOPACK_BUILD=1 TURBO_ENGINE_READ_ONLY=1 pnpm next build --experimental-build-mode=compile Time (mean ± σ): 27.206 s ± 0.540 s [User: 126.145 s, System: 15.958 s] Range (min … max): 26.543 s … 27.894 s 5 runs ```
Author
bgw bgw
Parents
Loading