Improve NumBufferTrait associated items#157976
Conversation
…ze depends on the integer instead of being the same for all integers
|
Some changes occurred in integer formatting cc @tgross35 |
|
@bors r+ |
|
⌛ Testing commit c558f6b with merge 22398ff... Workflow: https://github.com/rust-lang/rust/actions/runs/27855057977 |
|
yielding to rollup @bors yield |
|
Auto build was cancelled. Cancelled workflows: The next pull request likely to be tested is #158162. |
|
@rust-timer build 94ec748 |
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (94ec748): comparison URL. Overall result: ❌ regressions - please read:Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf. Next, please: If you can, justify the regressions found in this try perf run in writing along with @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 2.8%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary 3.9%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 489.308s -> 480.969s (-1.70%) |
|
I'm surprised: is any of these using |
|
The regression is rustdoc becoming slower in processing these crates, does rustdoc depend on this? |
|
|
|
It might be doing so indirectly, it seems like |
|
Nope, nothing is using |
| @@ -758,7 +758,7 @@ impl u128 { | |||
| /// ``` | |||
| #[stable(feature = "int_format_into", since = "CURRENT_RUSTC_VERSION")] | |||
| pub fn format_into(self, buf: &mut NumBuffer<Self>) -> &str { | |||
There was a problem hiding this comment.
Well, it's being used here at least, isn't it?
There was a problem hiding this comment.
That's the API added alongside NumBuffer. It's not used anywhere (yet?) in rustc/rustdoc/std.
There was a problem hiding this comment.
Ah ok, then I have no clue what's causing this, weird
There was a problem hiding this comment.
Welcome to the club. :')
…r=Amanieu Cleanup `NumBuffer` comment and replace `ilog(10)` with `ilog10()` A [nice person from mastodon](https://toot.cat/@jamey/116815991086205506) pointed out that a `FIXME` comment should have been removed alongside the others in rust-lang#157976, and also pointed out that the documentation mentions that `ilog10` is more optimized than `ilog(10)`. Shouldn't matter much here but since I already made a PR to remove the FIXME comment... r? @Amanieu
…r=Amanieu Cleanup `NumBuffer` comment and replace `ilog(10)` with `ilog10()` A [nice person from mastodon](https://toot.cat/@jamey/116815991086205506) pointed out that a `FIXME` comment should have been removed alongside the others in rust-lang#157976, and also pointed out that the documentation mentions that `ilog10` is more optimized than `ilog(10)`. Shouldn't matter much here but since I already made a PR to remove the FIXME comment... r? @Amanieu
Cleanup `NumBuffer` comment and replace `ilog(10)` with `ilog10()` A [nice person from mastodon](https://toot.cat/@jamey/116815991086205506) pointed out that a `FIXME` comment should have been removed alongside the others in rust-lang/rust#157976, and also pointed out that the documentation mentions that `ilog10` is more optimized than `ilog(10)`. Shouldn't matter much here but since I already made a PR to remove the FIXME comment... r? @Amanieu
Cleanup `NumBuffer` comment and replace `ilog(10)` with `ilog10()` A [nice person from mastodon](https://toot.cat/@jamey/116815991086205506) pointed out that a `FIXME` comment should have been removed alongside the others in rust-lang/rust#157976, and also pointed out that the documentation mentions that `ilog10` is more optimized than `ilog(10)`. Shouldn't matter much here but since I already made a PR to remove the FIXME comment... r? @Amanieu
It allows for
NumBuffer::bufsize to depend on the integer instead of being the same for all integers.The idea was suggested by @Amanieu (thanks a lot!).
r? @Amanieu