News for hackers. Stuff that matters.
Re:How JavaScript Works: deep dive into call, apply, and bind by afavour on Friday July 09, 2021 @07:50PM (#27789761)
Obviously there is a performance hit, my point is whether that hit is noteworthy at all. JavaScript VMs are incredibly efficient and have all manner of optimisations that aren’t apparent at first sight. Absent profiling data we can’t know and any best practises are really just shooting in the dark. For example: is Array.prototype.map just as efficient on non-arrays? What does it do internally, do we know it doesn’t create an array anyway?

There are no comments on this comment yet.