News for hackers. Stuff that matters.
Re:How JavaScript closures work under the hood by Lio on Sunday September 06, 2015 @08:59AM (#10177498)
AFAICT Closures are still much faster than Function.prototype.bind.

(http://jsperf.com/bind-vs-closure-setup/44)

Could anyone who knows more about the implementation details point to an explanation of what's going on under the surface?

Re:How JavaScript closures work under the hood by songgao on Sunday September 06, 2015 @12:33PM (#10178099)
Re:How JavaScript closures work under the hood by Lio on Tuesday September 08, 2015 @09:37AM (#10185554)
That's vert interesting. Thank you.
Re:How JavaScript closures work under the hood by inglor on Sunday September 06, 2015 @12:30PM (#10178094)
Here is an answer I wrote about it a while back http://stackoverflow.com/questions/17638305/why-is-bind-slow...

Let me know if you have any questions about it

Re:How JavaScript closures work under the hood by Lio on Tuesday September 08, 2015 @09:39AM (#10185567)
That's a great answer, thank you.
Re:How JavaScript closures work under the hood by draw_down on Sunday September 06, 2015 @12:24PM (#10178069)
How could test1 here ever be faster than test2? The functions are identical but calling test1 will always incur twice the actual function invocations, first to the bound function and then to _test1.