Pop vs Splice (v3)

Revision 3 of this benchmark created by Nami on


Setup

var x = [];
    for (var i = 0; i < 100; ++i) {
      x.push(i);
    }

Test runner

Ready to run.

Testing in
TestOps/sec
Pop
x.pop(x.indexOf(5));
ready
Splice
x.splice(x.indexOf(5), 1);
ready

Revisions

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