Skip to content

Instantly share code, notes, and snippets.

@JosePedroDias
Last active August 29, 2015 14:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JosePedroDias/0a67d7a815df531ba121 to your computer and use it in GitHub Desktop.
Save JosePedroDias/0a67d7a815df531ba121 to your computer and use it in GitHub Desktop.
performant arguments handling
var ctx = this; // this can be skipped if you don't care about the context
var argsL = arguments.length;
var args = new Array(argsL); // optimizable arguments-to-array
for(var i = 0; i < argsL; ++i) {
args[i] = arguments[i];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment