Skip to content

Conversation

pascaldekloe
Copy link
Contributor

@pascaldekloe pascaldekloe commented Aug 27, 2025

No need for fragmented buffers when formatting.

orig.txt: fmt::write_i128_exp                                                  143.39ns/iter      +/- 0.32
orig.txt: fmt::write_i64_exp                                                    68.72ns/iter      +/- 0.03
new.txt:  fmt::write_i128_exp                                                  138.29ns/iter      +/- 0.50
new.txt:  fmt::write_i64_exp                                                    58.93ns/iter      +/- 4.62

This patch fully eliminates unsafe pointer use (after #135265 and #136594).

r? libs

@rustbot
Copy link
Collaborator

rustbot commented Aug 27, 2025

r? @ibraheemdev

rustbot has assigned @ibraheemdev.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Aug 27, 2025
@pascaldekloe
Copy link
Contributor Author

https://rust.godbolt.org/z/oe9zr1qd9

Do you want to have another look @tgross35? 🙏 I think we can (and should) format floating points in a single buffer too. If that succeeds then we can drop unstable feature numfmt, package num::fmt. ✨

@tgross35
Copy link
Contributor

Thanks for the ping, sure I'm happy to take the formatting followups here

r? tgross35

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants