News for hackers. Stuff that matters.
Re:Currying in JavaScript by jondubois on Monday July 20, 2015 @12:08AM (#9913949)
I haven't witnessed 'abysmal' performance either. Based on some tests I just ran, calling a bound function is only about 25% slower than calling a non-bound one. That's pretty reasonable. Calling bind() on a function doesn't appear to take that much CPU time either.

That said I don't see the applications for currying in JavaScript. It just makes code less readable. It looks like an anti-pattern to me.

Re:Currying in JavaScript by hajile on Monday July 20, 2015 @07:01PM (#9919673)
Are you sure about those numbers (can you show your code?) Every benchmark I've seen shows a much bigger difference. Here's a jsperf (courtesy of the WayBackMachine) that shows a difference of about 20x+ over normal function calls.

https://web.archive.org/web/20141121220218/http://jsperf.com...