Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

    > theoretically compiler could have inlined slice
    > and looked one level deeper to see that.
I'd suspect that optimizing Array.prototype.slice.call(arguments, n, m) at the v8 level would yield pretty significant gains, even if no other arguments-object abuse was supported intelligently.

For almost any complicated operation on the arguments, your first step is to convert it (or part of it) to a true Array. Most libraries do that using Array.prototype.slice, in my experience.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: