rust/library/core/src/slice
bors e794b0f855 Auto merge of #125720 - folkertdev:optimize_for_size-ptr-rotate, r=Amanieu
make `ptr::rotate` smaller when using `optimize_for_size`

code to reproduce https://github.com/folkertdev/optimize_for_size-slice-rotate

In the example the size of `.text` goes down from 1624 to 276 bytes.

```
> cargo size --release --features "left-std"  -- -A

slice-rotate  :
section              size        addr
.vector_table        1024         0x0
.text                1624       0x400
.rodata                 0       0xa58
.data                   0  0x20000000
.gnu.sgstubs            0       0xa60
.bss                    0  0x20000000
.uninit                 0  0x20000000
.debug_loc            591         0x0
.debug_abbrev        1452         0x0
.debug_info         10634         0x0
.debug_aranges        480         0x0
.debug_ranges        1504         0x0
.debug_str          11716         0x0
.comment               72         0x0
.ARM.attributes        56         0x0
.debug_frame         1036         0x0
.debug_line          5837         0x0
Total               36026

> cargo size --release --features "left-size"  -- -A

slice-rotate  :
section             size        addr
.vector_table       1024         0x0
.text                276       0x400
.rodata                0       0x514
.data                  0  0x20000000
.gnu.sgstubs           0       0x520
.bss                   0  0x20000000
.uninit                0  0x20000000
.debug_loc           347         0x0
.debug_abbrev        965         0x0
.debug_info         4216         0x0
.debug_aranges       168         0x0
.debug_ranges        216         0x0
.debug_str          3615         0x0
.comment              72         0x0
.ARM.attributes       56         0x0
.debug_frame         232         0x0
.debug_line          723         0x0
Total              11910
```

tracking issue: https://github.com/rust-lang/rust/issues/125612
2024-06-17 01:45:22 +00:00
..
iter Convert some iter macros to normal functions 2024-04-25 22:16:02 -07:00
ascii.rs Auto merge of #126273 - pietroalbini:pa-bootstrap-update, r=Mark-Simulacrum 2024-06-12 18:15:32 +00:00
cmp.rs Refer to "slice" instead of "vector" in Ord and PartialOrd trait impl of slice 2024-03-06 10:13:05 +01:00
index.rs Redo SliceIndex implementations 2024-06-15 17:39:25 -07:00
iter.rs replace version placeholder 2024-06-11 16:52:02 +02:00
memchr.rs Use usize::repeat_u8 instead of implementing repeat_byte in memchr.rs 2023-11-26 12:27:56 +00:00
mod.rs replace version placeholder 2024-06-11 16:52:02 +02:00
raw.rs Rollup merge of #123374 - mgeier:doc-slice-from-raw-parts, r=scottmcm 2024-06-12 03:57:18 -07:00
rotate.rs make ptr::rotate smaller when using optimize_for_size 2024-05-29 13:51:55 +02:00
select.rs Use helper functions for min/max_idx 2023-05-24 19:33:04 +00:00
sort.rs Avoid unnecessary comparison in partition_equal 2023-10-25 19:37:14 +02:00
specialize.rs Remove size_of == 1 case from fill specialization. 2021-08-09 19:25:28 +02:00