Push vs Splice (v2)

Revision 2 of this benchmark created by Bill on


Setup

var arr = [];

Test runner

Ready to run.

Testing in
TestOps/sec
Splice Add
arr.splice(arr.length, 0, 5);
ready
Push Add
arr.push(5);
ready

Revisions

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