for length bench

JavaScript performance comparison

Test case created by Simon

Preparation code


var list = [];
for (var i = 0; i < 99999; i++) {


Test runner

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

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
var a = [];
for (var i = 0; i < list.length; i++) {
var l
var a = [];
var l = list.length;
for (var i = 0; i < l; i++) {

Compare results of other browsers


You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:

1 comment

Corey commented :

TypeError: 'undefined' is not an object.

message: TypeError: 'undefined' is not an object fileName: undefined lineNumber: 0

Comment form temporarily disabled.

Add a comment