Optimize formatting by 80-90% by avoiding write!. #303
No reviewers
Labels
No labels
breaking
bug
dependencies
good first issue
help wanted
unstable
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-uuid-rs/uuid!303
Loading…
Reference in a new issue
No description provided.
Delete branch "string-formatting"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I'm submitting a(n) refactor.
Description
Using a temporary byte buffer along with manual decomposition of the
UUID means the code compiles down to a nice loop, instead of doing
multiple virtual function calls as it does with
write!.Motivation
The code was unnecessarily slow.
Tests
All the existing formatting tests pass, and I introduced a benchmark. Here's the output of
cargo benchcmpon before/after results for that benchmark:Looks good to me! Thanks @huonw
bors r+
Build succeeded