splice_unshift

Benchmark created by Rostyslav on


Test runner

Ready to run.

Testing in
TestOps/sec
shift
var i;
var arr = [];
for (i = 0; i < 10000; i++) {
  arr.push(i)
}
for (i = 0; i < 99999; i++) {
  arr.shift()
}
ready
splice
var i;
var arr = [];
for (i = 0; i < 10000; i++) {
  arr.push(i)
}
for (i = 0; i < 99999; i++) {
  arr = arr.splice(1)
}
ready

Revisions

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

  • Revision 1: published by Rostyslav on