native Array versus homebrew Array

Benchmark created by Johnny Freeman on


Test runner

Ready to run.

Testing in
TestOps/sec
Native Array
var browsers = new Array('Chrome', 'Firefox', 'Safari', 'Internet Explorer');

browsers.splice(2, 0, 'Opera');
ready
Homebrew Array
var browsers = {
  length: 4,
  splice: Array.prototype.splice,
  0: 'Chrome',
  1: 'Firefox',
  2: 'Safari',
  3: 'Internet Explorer'
};

browsers.splice(2, 0, 'Opera');
ready

Revisions

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

  • Revision 1: published by Johnny Freeman on