Faster fmt::Display of 128-bit integers, without unsafe pointer#136594
Faster fmt::Display of 128-bit integers, without unsafe pointer#136594bors merged 2 commits intorust-lang:masterfrom
Conversation
This comment has been minimized.
This comment has been minimized.
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
|
@pascaldekloe: 🔑 Insufficient privileges: not in try users |
|
Do you have a link to the asm diff? |
|
☔ The latest upstream changes (presumably #136409) made this pull request unmergeable. Please resolve the merge conflicts. |
|
658adc6 to
3a09315
Compare
This comment has been minimized.
This comment has been minimized.
|
Constant calculation done with https://gist.github.com/pascaldekloe/df103c17ebf01920958053c76505aedf. |
|
I don't have any concerns here but the tests need to be fixed of course :) @rustbot author |
|
Reminder, once the PR becomes ready for a review, use |
3a09315 to
bfb09cf
Compare
This comment has been minimized.
This comment has been minimized.
bfb09cf to
1ce1b97
Compare
|
@rustbot ready |
|
☔ The latest upstream changes (presumably #142133) made this pull request unmergeable. Please resolve the merge conflicts. |
tgross35
left a comment
There was a problem hiding this comment.
Hey, I'm very sorry this PR kept falling off my todo list. I have now had a chance to read through thoroughly and it looks great. Left a few small comments, but with those, a rebase, and a final try job I think this should be good to go.
Any chance you could post local benchmarks as well?
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (f791aa5): comparison URL. Overall result: ✅ improvements - no action neededBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. @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 (secondary 0.8%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary 2.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary -0.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 754.321s -> 755.157s (0.11%) |
|
One final comment request #136594 (comment) and it would be good if you could post benchmarks and/or an asm diff. After that, r=me |
|
The following was measured locally on Apple M1 @tgross35. MasterChange |
|
Thank you for all the work here! @bors r+ |
|
☀️ Test successful - checks-actions |
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing 31d0d21 (parent) -> 1434630 (this PR) Test differencesShow 5 test diffsStage 1
Job group index
Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 14346303d760027e53214e705109a62c0f00b214 --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
Finished benchmarking commit (1434630): comparison URL. Overall result: ❌ regressions - no action needed@rustbot label: -perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (secondary 1.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary 6.6%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary -0.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 754.746s -> 755.927s (0.16%) |
Faster fmt::Display of 128-bit integers, without unsafe pointer In followup of rust-lang#135265, hereby the 128-bit part. * Batches per 16 instead of 19 digits * Buffer access as array insteaf of unsafe pointer * Added test coverage for i128 and u128 r? tgross35 ChrisDenton
single buffer for exponent fmt of integers 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 rust-lang#135265 and rust-lang#136594). r? libs
Rollup merge of #145940 - pascaldekloe:int-exp-tune, r=tgross35 single buffer for exponent fmt of integers 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
single buffer for exponent fmt of integers 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 rust-lang/rust#135265 and rust-lang/rust#136594). r? libs
single buffer for exponent fmt of integers 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 rust-lang#135265 and rust-lang#136594). r? libs
single buffer for exponent fmt of integers 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 rust-lang/rust#135265 and rust-lang/rust#136594). r? libs
single buffer for exponent fmt of integers 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 rust-lang/rust#135265 and rust-lang/rust#136594). r? libs
In followup of #135265, hereby the 128-bit part.
r? tgross35 ChrisDenton