rust/library
bors 4ecfdfac51 Auto merge of #100214 - scottmcm:strict-range, r=thomcc
Optimize `array::IntoIter`

`.into_iter()` on arrays was slower than it needed to be (especially compared to slice iterator) since it uses `Range<usize>`, which needs to handle degenerate ranges like `10..4`.

This PR adds an internal `IndexRange` type that's like `Range<usize>` but with a safety invariant that means it doesn't need to worry about those cases -- it only handles `start <= end` -- and thus can give LLVM more information to optimize better.

I added one simple demonstration of the improvement as a codegen test.

(`vec::IntoIter` uses pointers instead of indexes, so doesn't have this problem, but that only works because its elements are boxed.  `array::IntoIter` can't use pointers because that would keep it from being movable.)
2022-09-21 00:41:33 +00:00
..
alloc Rollup merge of #101798 - y86-dev:const_waker, r=lcnr 2022-09-19 17:55:19 +02:00
backtrace@07872f28cd Update backtrace 2022-09-02 16:09:58 -04:00
core Auto merge of #100214 - scottmcm:strict-range, r=thomcc 2022-09-21 00:41:33 +00:00
panic_abort Update comment about personalities in panic_abort 2022-08-23 16:12:58 +08:00
panic_unwind Auto merge of #92845 - Amanieu:std_personality, r=Mark-Simulacrum 2022-08-28 04:16:29 +00:00
portable-simd separate the receiver from arguments in HIR under /clippy 2022-09-05 22:25:57 +09:00
proc_macro Fix typo in proc_macro Span::eq 2022-09-17 19:15:30 -04:00
profiler_builtins Fully stabilize NLL 2022-06-03 17:16:41 -04:00
rtstartup Remove custom frame info registration on i686-pc-windows-gnu 2022-08-23 16:12:58 +08:00
rustc-std-workspace-alloc Switch all libraries to the 2021 edition 2021-12-23 19:03:47 +08:00
rustc-std-workspace-core Switch all libraries to the 2021 edition 2021-12-23 19:03:47 +08:00
rustc-std-workspace-std Switch all libraries to the 2021 edition 2021-12-23 19:03:47 +08:00
std Auto merge of #100581 - joboet:sync_rwlock_everywhere, r=thomcc 2022-09-20 22:00:08 +00:00
stdarch@699c093a42 Update stdarch 2022-09-15 13:05:28 -04:00
test Fix naming format of IEEE 754 standard 2022-09-11 04:13:33 +02:00
unwind unwind: don't build dependency when building for Miri 2022-08-15 12:54:12 -04:00