Array reverse

Benchmark created on


Setup

const data = [...Array(1000).keys()];

Test runner

Ready to run.

Testing in
TestOps/sec
reduce right
data.reduceRight((a, c) => (a.push(c), a), []);
ready
spread
[...data].reverse();
ready
slice
data.slice().reverse();
ready
from
Array.from(data).reverse();
ready
toReversed
data.toReversed();
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.