shift vs pop: 10k elements (v2)

Revision 2 of this benchmark created on


Description

virtually no difference

Setup

const ITERS = 10_000;
let arr = [];
for (let i = 0; i < ITERS; i++) arr.push(i);

Test runner

Ready to run.

Testing in
TestOps/sec
pop
while (arr.length) arr.pop();
ready
shift
while (arr.length) arr.shift();
ready

Revisions

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