Array methods on array-like

Benchmark created by rock on


Preparation HTML

<script src='http://ls.zloirock.ru/core.js'></script>

Setup

var string = 'qweasdzxc'
      , result;

Test runner

Ready to run.

Testing in
TestOps/sec
proto
result = Array.prototype.indexOf.call(string, 'x');
ready
[]
result = [].indexOf.call(string, 'x');
ready
Array.from
result = Array.from(string).indexOf('x');
ready
static
result = Array.indexOf(string, 'x');
ready

Revisions

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

  • Revision 1: published by rock on