Just pass Layout directly to box_new_uninit#152737
Just pass Layout directly to box_new_uninit#152737scottmcm wants to merge 2 commits intorust-lang:mainfrom
Layout directly to box_new_uninit#152737Conversation
|
rustbot has assigned @Mark-Simulacrum. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
Since we saw this code is perf-sensitive, to make sure it doesn't blow up... |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Just pass `Layout` directly to `box_new_uninit`
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
f6af841 to
d413781
Compare
|
Finished benchmarking commit (8dd6c97): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowBenchmarking 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. Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient 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.3%, secondary 3.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary -3.2%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary -0.2%, secondary -2.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 480.798s -> 483.051s (0.47%) |
This comment has been minimized.
This comment has been minimized.
035fa58 to
9ed30a0
Compare
|
@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.
Just pass `Layout` directly to `box_new_uninit`
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (b517e4f): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowBenchmarking 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. Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient 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 1.3%, secondary 2.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 2.3%, secondary -3.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary -0.6%, secondary -2.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 483.207s -> 482.56s (-0.13%) |
library/alloc/src/boxed.rs
Outdated
| @@ -319,12 +315,7 @@ impl<T> Box<T> { | |||
| // SAFETY: | |||
| // - The size and align of a valid type `T` are always valid for `Layout`. | |||
There was a problem hiding this comment.
This first point seems outdated now.
We have a constant for it already (used in `RawVec` for basically the same polymorphization) so let's use it. Conveniently, it can even be safe that way!
9ed30a0 to
4b03b97
Compare
|
@bors r=RalfJung |
We have a constant for it already (used in
RawVecfor basically the same polymorphization) so let's use it.This is a simple follow-up to #148190 from one of the comments.