vercel
next.js
BlogDocsChangelog

[turbopack] optimize the TurboMalloc threadlocals

#80265Merged
Comparing
tcmalloc
(
9fc1cd1
) with
canary
(
1d70e57
)
CodSpeed Performance Gauge
+16%
Improvements
1
Regressions
2
Untouched
12

Benchmarks

Failed

rcstr!/large
turbopack/crates/turbo-rcstr/benches/mod.rs::benches::bench_construct::Rcstr::construct
Regression
CodSpeed Performance Gauge
-7%
396.7 ns425.8 ns
from/small
turbopack/crates/turbo-rcstr/benches/mod.rs::benches::bench_construct::Rcstr::construct
Regression
CodSpeed Performance Gauge
-6%
438.3 ns467.5 ns

Improved

rcstr!/small
turbopack/crates/turbo-rcstr/benches/mod.rs::benches::bench_construct::Rcstr::construct
CodSpeed Performance Gauge
+16%
211.9 ns182.8 ns

Passed

build[date-fns-single]
turbopack/crates/turbopack-cli/benches/small_apps.rs::benches::bench_small_apps::turbopack/build/apps
CodSpeed Performance Gauge
+1%
1.6 s1.6 s
build[framer-motion-single]
turbopack/crates/turbopack-cli/benches/small_apps.rs::benches::bench_small_apps::turbopack/build/apps
CodSpeed Performance Gauge
0%
2.6 s2.6 s
map[cloned]
turbopack/crates/turbo-rcstr/benches/mod.rs::benches::bench_map::RcStr
CodSpeed Performance Gauge
0%
98.9 µs98.9 µs
build[lucide-react-single]
turbopack/crates/turbopack-cli/benches/small_apps.rs::benches::bench_small_apps::turbopack/build/apps
CodSpeed Performance Gauge
0%
1 s1 s
from/large
turbopack/crates/turbo-rcstr/benches/mod.rs::benches::bench_construct::Rcstr::construct
CodSpeed Performance Gauge
0%
2 µs2 µs
map[unique]
turbopack/crates/turbo-rcstr/benches/mod.rs::benches::bench_map::RcStr
CodSpeed Performance Gauge
0%
32.7 µs32.7 µs
build[joy]
turbopack/crates/turbopack-cli/benches/small_apps.rs::benches::bench_small_apps::turbopack/build/apps
CodSpeed Performance Gauge
0%
2.5 s2.5 s
build[date-fns-all]
turbopack/crates/turbopack-cli/benches/small_apps.rs::benches::bench_small_apps::turbopack/build/apps
CodSpeed Performance Gauge
0%
2.7 s2.7 s
build[shiki]
turbopack/crates/turbopack-cli/benches/small_apps.rs::benches::bench_small_apps::turbopack/build/apps
CodSpeed Performance Gauge
0%
6.2 s6.2 s
build[lucide-react-all]
turbopack/crates/turbopack-cli/benches/small_apps.rs::benches::bench_small_apps::turbopack/build/apps
CodSpeed Performance Gauge
0%
12 s12 s
build[framer-motion-all]
turbopack/crates/turbopack-cli/benches/small_apps.rs::benches::bench_small_apps::turbopack/build/apps
CodSpeed Performance Gauge
0%
3.8 s3.8 s
build[mui]
turbopack/crates/turbopack-cli/benches/small_apps.rs::benches::bench_small_apps::turbopack/build/apps
CodSpeed Performance Gauge
0%
3.7 s3.8 s

Commits

Click on a commit to change the comparison range
Base
canary
1d70e57
+15.96%
[turbopack] optimize the TurboMalloc threadlocals By declaring our initializer as `const {..}` we can leverage the experimental `#[thread_local]` attribute which delgates to `llvms` `threadlocal` implementation. This can improve performance on supported platforms.
9fc1cd1
6 months ago
by lukesandberg
© 2025 CodSpeed Technology
Home Terms Privacy Docs