Avatar for the DaniPopes user
DaniPopes
const-hex
BlogDocsChangelog

perf: optimize SIMD check and encode implementations

#39Merged
Comparing
dani/optimize-simd
(
852c862
) with
master
(
023646a
)
CodSpeed Performance Gauge
-30%
Improvement
12
Regression
4
Untouched
20

Benchmarks

36 total
bench1_32b
benches/bench/main.rs::check::const_hex
CodSpeed Performance Gauge
-30%
321.9 ns460 ns
bench1_32b
benches/bench/main.rs::encode_to_slice::const_hex
CodSpeed Performance Gauge
-13%
429.4 ns493.1 ns
bench2_256b
benches/bench/main.rs::encode_to_slice::const_hex
CodSpeed Performance Gauge
-11%
812.5 ns915 ns
bench1_32b
benches/bench/main.rs::decode::const_hex
CodSpeed Performance Gauge
-10%
1.3 µs1.5 µs
bench6_1m
benches/bench/main.rs::check::const_hex
CodSpeed Performance Gauge
+36%
1.6 ms1.2 ms
bench5_128k
benches/bench/main.rs::check::const_hex
CodSpeed Performance Gauge
+36%
206.2 µs151.7 µs
bench4_16k
benches/bench/main.rs::check::const_hex
CodSpeed Performance Gauge
+35%
26 µs19.3 µs
bench3_2k
benches/bench/main.rs::check::const_hex
CodSpeed Performance Gauge
+27%
3.5 µs2.8 µs
bench6_1m
benches/bench/main.rs::decode_to_slice::const_hex
CodSpeed Performance Gauge
+21%
2.5 ms2.1 ms
bench6_1m
benches/bench/main.rs::decode::const_hex
CodSpeed Performance Gauge
+21%
2.5 ms2.1 ms
bench5_128k
benches/bench/main.rs::decode_to_slice::const_hex
CodSpeed Performance Gauge
+21%
312 µs257.5 µs
bench5_128k
benches/bench/main.rs::decode::const_hex
CodSpeed Performance Gauge
+21%
314.6 µs260.1 µs
bench4_16k
benches/bench/main.rs::decode_to_slice::const_hex
CodSpeed Performance Gauge
+20%
39.7 µs32.9 µs
bench4_16k
benches/bench/main.rs::decode::const_hex
CodSpeed Performance Gauge
+19%
41.6 µs34.9 µs
bench3_2k
benches/bench/main.rs::decode_to_slice::const_hex
CodSpeed Performance Gauge
+16%
5.6 µs4.8 µs
bench3_2k
benches/bench/main.rs::decode::const_hex
CodSpeed Performance Gauge
+10%
7.8 µs7.1 µs
bench6_1m
benches/bench/main.rs::encode_to_slice::const_hex
CodSpeed Performance Gauge
+6%
1.7 ms1.6 ms
bench6_1m
benches/bench/main.rs::encode::const_hex
CodSpeed Performance Gauge
+6%
1.7 ms1.6 ms
bench5_128k
benches/bench/main.rs::encode_to_slice::const_hex
CodSpeed Performance Gauge
+5%
215.9 µs204.8 µs
bench5_128k
benches/bench/main.rs::encode::const_hex
CodSpeed Performance Gauge
+5%
218.9 µs207.6 µs
bench4_16k
benches/bench/main.rs::encode::const_hex
CodSpeed Performance Gauge
+5%
28.6 µs27.3 µs
bench4_16k
benches/bench/main.rs::encode_to_slice::const_hex
CodSpeed Performance Gauge
+5%
27.3 µs26 µs
bench2_256b
benches/bench/main.rs::decode_to_slice::const_hex
CodSpeed Performance Gauge
+3%
1.5 µs1.4 µs
bench6_1m
benches/bench/main.rs::format::const_hex
CodSpeed Performance Gauge
+2%
4 ms3.9 ms
bench3_2k
benches/bench/main.rs::encode::const_hex
CodSpeed Performance Gauge
+2%
5.7 µs5.6 µs

Commits

Click on a commit to change the comparison range
Base
master
023646a
-14.3%
perf: optimize SIMD check and encode implementations
7bb2f10
2 months ago
by DaniPopes
-5.71%
fix: use signed overflow trick for SSE2 check, clean up tests
612c134
2 months ago
by DaniPopes
-10.21%
clean
3682bd0
2 months ago
by DaniPopes
0%
perf: avoid SSSE3 loop in AVX2 encode remainder
556ea36
2 months ago
by DaniPopes
0%
unoutline
655c087
2 months ago
by DaniPopes
+4.95%
perf: skip remainder check for exact chunk multiples
e27abcd
2 months ago
by DaniPopes
-4.74%
more empty fast paths
cbc85f7
2 months ago
by DaniPopes
0%
refactor: reorder one_chunk fns below with_ fns, add debug assertions
c8e42cf
2 months ago
by DaniPopes
0%
refactor: remove unnecessary closure type hints
852c862
2 months ago
by DaniPopes
© 2026 CodSpeed Technology
Home Terms Privacy Docs