Avatar for the t28hub user
t28hub
auto-palette
BlogDocsChangelog

perf: replace `HashMap` and `HashSet` with `FxHashMap` and `FxHashSet`

#214Merged
Comparing
perf/hashmap-to-fxhashmap
(
cd976ac
) with
main
(
387262e
)
CodSpeed Performance Gauge
+8%
Improvements
0
Regressions
0
Untouched
10
New
0
Dropped
0
Ignored
0

Benchmarks

Passed

bench_algorithm[f32, kmeans]
crates/auto-palette/benches/algorithm.rs::bench_algorithm[f32, kmeans]
CodSpeed Performance Gauge
+14%
1.7 s
1.5 s
bench_algorithm[f32, slic]
crates/auto-palette/benches/algorithm.rs::bench_algorithm[f32, slic]
CodSpeed Performance Gauge
+13%
2.2 s
2 s
bench_algorithm[f64, kmeans]
crates/auto-palette/benches/algorithm.rs::bench_algorithm[f64, kmeans]
CodSpeed Performance Gauge
+13%
1.9 s
1.6 s
bench_algorithm[f32, snic]
crates/auto-palette/benches/algorithm.rs::bench_algorithm[f32, snic]
CodSpeed Performance Gauge
+12%
493.4 ms
438.6 ms
bench_algorithm[f64, slic]
crates/auto-palette/benches/algorithm.rs::bench_algorithm[f64, slic]
CodSpeed Performance Gauge
+11%
2.6 s
2.4 s
bench_algorithm[f64, snic]
crates/auto-palette/benches/algorithm.rs::bench_algorithm[f64, snic]
CodSpeed Performance Gauge
+10%
601.4 ms
546.6 ms
bench_algorithm[f32, dbscan++]
crates/auto-palette/benches/algorithm.rs::bench_algorithm[f32, dbscan++]
CodSpeed Performance Gauge
+5%
1.1 s
1 s
bench_algorithm[f64, dbscan++]
crates/auto-palette/benches/algorithm.rs::bench_algorithm[f64, dbscan++]
CodSpeed Performance Gauge
+4%
1.2 s
1.2 s
bench_algorithm[f64, dbscan]
crates/auto-palette/benches/algorithm.rs::bench_algorithm[f64, dbscan]
CodSpeed Performance Gauge
+1%
2.7 s
2.7 s
bench_algorithm[f32, dbscan]
crates/auto-palette/benches/algorithm.rs::bench_algorithm[f32, dbscan]
CodSpeed Performance Gauge
+1%
2.6 s
2.6 s

Commits

Click on a commit to change the comparison range
Base
main
387262e
+8%
perf: replace HashMap and HashSet with FxHashMap and FxHashSet - Improved performance by using rustc-hash's FxHashMap and FxHashSet. - Limited usage to internal library components since the algorithm is non-cryptographic.
cd976ac
7 days ago
by t28hub
© 2025 CodSpeed Technology
Home Terms Privacy Docs