mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
d6eb7bca09
Optimize `slice_iter.copied().next_chunk()` ``` OLD: test iter::bench_copied_array_chunks ... bench: 371 ns/iter (+/- 7) NEW: test iter::bench_copied_array_chunks ... bench: 31 ns/iter (+/- 0) ``` The default `next_chunk` implementation suffers from having to assemble the array byte by byte via `next()`, checking the `Option<&T>` and then dereferencing `&T`. The specialization copies the chunk directly from the slice. |
||
---|---|---|
.. | ||
alloc | ||
backtrace@07872f28cd | ||
core | ||
panic_abort | ||
panic_unwind | ||
portable-simd | ||
proc_macro | ||
profiler_builtins | ||
rtstartup | ||
rustc-std-workspace-alloc | ||
rustc-std-workspace-core | ||
rustc-std-workspace-std | ||
std | ||
stdarch@790411f93c | ||
test | ||
unwind |