Skip to content

Instantly share code, notes, and snippets.

@aarongustafson
Created December 6, 2009 00:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aarongustafson/249947 to your computer and use it in GitHub Desktop.
Save aarongustafson/249947 to your computer and use it in GitHub Desktop.
Object and array literals are faster than constructors
function usingConstructors( string )
{
var a = new Array(), o = new Object();
}
function usingLiterals ( string )
{
var a = [], o = {};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment