array.splice vs Array.prototype.splice.call

Benchmark created by aravind on


Description

Arrays passed over windows get corrupted. Instead this method could be used if performance is satisfactory

Preparation HTML

<script>
  var arr = new Array(1000);
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
array.splice
arr.splice(500, 1)
ready
Array.prototype.splice.call
Array.prototype.splice.call(arr, 500, 1)
ready
arr.splice.call
arr.splice.call(arr, 500, 1)
ready
arr.splice.bind
arr.splice.bind(arr)
arr.splice(500, 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 aravind on