Skip to content

Iffy perf claims at: Converting to an array #37

jdalton opened this Issue Mar 12, 2011 · 2 comments

2 participants

jdalton commented Mar 12, 2011

So I don't see the perf concern of [], use it if u need to slice up the arguments object:

var args =,
var first = slice.shift(); // remove first

bar.apply(null, args);

So basically use it when you need it and not when you don't :D

jdalton commented Mar 12, 2011

You should also mention that by simply using the arguments object, engines may disable optimizations which will result is perf hit for the specific function. See issue 19.


Any PR arising from this? I'm helping to maintain now so stuff is being merged.


@timruffles timruffles closed this Oct 9, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.