3 ms·
Even when passing the array as a borrow instead of a clone[1], map still auto-vectorizes and performs the new allocation in one go, avoiding the bounds check an
by arllk 2y ago
Even when passing the array as a borrow instead of a clone[1], map still auto-vectorizes and performs the new allocation in one go, avoiding the bounds check and possible calls to grow_one
[1] https://godbolt.org/z/K9z6PvdYh https://godbolt.org/z/K9z6PvdYh