var-or-vars

JavaScript performance comparison

Test case created by Samuel

Info

One or multiple var statements.

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
Multiple
var a = 2;
var b = "red";
var c = { "foo": a, "bar": b, "baz": true };
var d = [1,1,2,3,5];
var e = new Date();
var f = false;
var g = f || {};
pending…
Single
var a = 2,
 b = "red",
 c = { "foo": a, "bar": b, "baz": true },
 d = [1,1,2,3,5],
 e = new Date(),
 f = false,
 g = f || {};
pending…

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

Compare results of other browsers

0 comments

Add a comment