addyosmani / memoize.js

A faster JavaScript memoizer
http://addyosmani.com
143 stars 19 forks source link

You're converting arguments to an array needlessly #3

Closed cowboy closed 11 years ago

cowboy commented 13 years ago

Why do you do var args = Array.prototype.slice.call(arguments) if you only ever access args.length and args[i]?

DmitryBaranovskiy commented 13 years ago

I guess, as less you are touching arguments as better: http://kangax.github.com/jstests/arguments_perf_test/