Casting-type (v21)

Revision 21 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
objects
var arr = [1, "test", {}, []];

var x = "";
var y = "";
var z = "";

arr.indexOf("test");
ready
strings
var arr = ["", "test", "", ""];

var x = {};
var y = [];
var z = 1;

arr.indexOf("test");
ready
objects alone
var arr = [{}, {foo: 'baz'}, {}, {}];

var x = {};
var y = {};
var z = {};

arr.indexOf({foo: 'baz'});
ready

Revisions

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