News for hackers. Stuff that matters.
Re:Long live the callbacks by munificent on Thursday August 22, 2013 @01:05PM (#6258373)
In the first example, he creates a unique closure per point instance and places it on the point itself.

In the second example, he creates a single closure and places it on the point's prototype.

Unsurprisingly, creating one object is faster than creating a thousand of them. I'm not sure why the author thinks this has anything to do with closures.

There are no comments on this comment yet.