Skip to content

perf: optimize from_str_radix#557

Open
DaniPopes wants to merge 1 commit intorecmo:mainfrom
DaniPopes:dani/from-str-radix-perf
Open

perf: optimize from_str_radix#557
DaniPopes wants to merge 1 commit intorecmo:mainfrom
DaniPopes:dani/from-str-radix-perf

Conversation

@DaniPopes
Copy link
Contributor

@DaniPopes DaniPopes commented Feb 7, 2026

Use actual from_str routines instead of treating every character like a u64 digit.

@DaniPopes DaniPopes requested a review from prestwich as a code owner February 7, 2026 01:37
@codspeed-hq
Copy link

codspeed-hq bot commented Feb 7, 2026

Merging this PR will improve performance by ×32

⚡ 59 improved benchmarks
✅ 327 untouched benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
most_significant_bits/4096/4096 28.9 µs 26.1 µs +10.88%
parse/binary/256/max 51.7 ms 15.2 ms ×3.4
parse/binary/192/max 33.5 ms 11.4 ms ×2.9
parse/binary/192/zero 598.8 µs 248.7 µs ×2.4
parse/binary/128/zero 559.6 µs 198.3 µs ×2.8
parse/binary/4096/max 77.9 ms 2.4 ms ×32
parse/binary/64/zero 467.5 µs 139.6 µs ×3.3
parse/binary/384/max 104.1 ms 22.8 ms ×4.6
parse/binary/128/max 19.6 ms 7.6 ms ×2.6
parse/binary/256/zero 679.8 µs 287.9 µs ×2.4
parse/binary/4096/zero 62.5 µs 32.4 µs +93.11%
parse/binary/512/zero 1,061.9 µs 511.6 µs ×2.1
parse/binary/512/max 171.4 ms 30.3 ms ×5.7
parse/binary/64/max 8.5 ms 3.3 ms ×2.6
parse/decimal/128/max 6.3 ms 1.6 ms ×3.9
parse/decimal/192/zero 598.8 µs 273.7 µs ×2.2
parse/binary/384/zero 875 µs 410.9 µs ×2.1
parse/decimal/192/max 10.4 ms 2.2 ms ×4.7
parse/decimal/128/zero 559.6 µs 215.1 µs ×2.6
parse/decimal/256/max 16.1 ms 3.3 ms ×4.8
... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.


Comparing DaniPopes:dani/from-str-radix-perf (89f64de) with main (c147f59)

Open in CodSpeed

@DaniPopes DaniPopes force-pushed the dani/from-str-radix-perf branch 2 times, most recently from 767fd43 to 9d03973 Compare February 7, 2026 02:49
@DaniPopes DaniPopes force-pushed the dani/from-str-radix-perf branch from 9d03973 to 89f64de Compare February 7, 2026 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant