new array vs literal

JavaScript performance comparison

Revision 11 of this test case created by gfdsd

Test runner

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

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
pre-filled array literal int
var newArray = [1,2]
pending…
new Array(length) prefilled with int
var newArray = new Array(1,2)
 
pending…
pre-filled array literal int + float
var newArray = [1,.2]
pending…
new Array(length) prefilled with int + float
var newArray = new Array(1,.2)
pending…

Compare results of other browsers

Revisions

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:

0 comments

Add a comment