Also simplify size/align_of_val<T: Sized> to size/align_of<T> instead#152681
Also simplify size/align_of_val<T: Sized> to size/align_of<T> instead#152681scottmcm wants to merge 4 commits intorust-lang:mainfrom
size/align_of_val<T: Sized> to size/align_of<T> instead#152681Conversation
| _5 = std::intrinsics::align_of_val::<[u8; 1024]>(move _3) -> [return: bb2, unwind unreachable]; | ||
| } | ||
|
|
||
| bb2: { |
There was a problem hiding this comment.
Conveniently, these extra blocks just disappear once the intrinsics are placed with constants.
|
@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.
Also simplify `size/align_of_val<T: Sized>` to `size/align_of<T>` instead
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (c0dc515): 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%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 12.2%, secondary -3.2%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary 0.3%, secondary -0.9%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 481.904s -> 482.488s (0.12%) |
|
Closing in favour of #152689 |
Follow-up to #152641
This is relevant to things like
Box<[u8; 1024]>where the drop looks at thesize_of_val(since obviously it might be DST in general) but where we don't actually need to do that since it's always that same value for theSizedtype.