bmfont-rust
bmfont-rust copied to clipboard
Iterate ParseIter during Bench
PR #11 did not iterate through the parsed characters, which produced inaccurate bench results. This PR:
- [x] Fixes the iteration
- [x] Updates
criterion
- [x] Fixes some clippy lints
- [x] Makes a few unwraps quicker (2-5% gain)
Updated results compared to pre-#11 run from a different machine:
-
Winner: Attackgoat
: Before=1.3us After=455ns -
Van Gogh my earlo...[~520 CHARS]
: Before=35us After=16.7us
This is the perf graph for Winner: Attackgoat
; blue is this PR and red is d47fc1e
with f8918b7
:
I noticed this discrepancy when performance profiling some other code. This library is still fast but I was expecting more from the previous PR.