Hacker News new | past | comments | ask | show | jobs | submit login

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.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: