a bit optimize four-digit chunks in integer formatting#159130
Conversation
|
Some changes occurred in integer formatting cc @tgross35 |
|
r? @clarfonthey rustbot has assigned @clarfonthey. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
|
Haven't reviewed the code yet, but have you actually benchmarked this other than checking the generated assembly? Because number of instructions isn't really a metric we care about, just speed; we have |
Yes, I'll send results a little later |
Number of asm instructions has decreased (78 -> 59)
The current upstream version contains:
(if
n > 9_999_999_999_999_999-> go to panic)But this function isn't part of the public API, so I suppose we can use
assert_unchecked(n < 10_000_000_000_000_000);Similarly,
write_quadhas been moved to a separate fn to reduce duplication slightly