mirror of
https://github.com/openharmony/third_party_rust_rust-smallvec.git
synced 2026-07-21 01:55:25 -04:00
aabaee0a82
This adds "bench_from_slice(_vec)(_small)" benches, renaming the previous versions to "bench_from_iter*" (because they were using `From<&[T]>`, which calls `FromIterator` internally) and optimizes the `from_slice` constructor considerably. Before: ``` test bench_from_slice ... bench: 42 ns/iter (+/- 0) test bench_from_slice_small ... bench: 12 ns/iter (+/- 0) ``` After: ``` test bench_from_slice ... bench: 27 ns/iter (+/- 0) test bench_from_slice_small ... bench: 8 ns/iter (+/- 0) ```