puffnfresh / bilby.js

Serious functional programming library for JavaScript.
http://bilby.brianmckenna.org/
MIT License
592 stars 24 forks source link

Extremely slow curry #12

Open elclanrs opened 10 years ago

elclanrs commented 10 years ago

Bilby's curry compared to LiveScript's curry on same code. Image speaks more than words: Imgur

SimonRichardson commented 10 years ago

Any chance of knowing what you're testing (examples, test cases), so we're not comparing apples and oranges.

elclanrs commented 10 years ago

I'm testing with some simple lazy streams code. I made a jsPerf. Bilby is like 10 times slower.

kmarekspartz commented 10 years ago

While performance is important, they are for totally different things.

Kyle Marek-Spartz

On March 8, 2014 at 3:42:47 AM, elclanrs (notifications@github.com) wrote:

Bilby's curry compared to LiveScript's curry. Image speaks more than words: Imgur


Reply to this email directly or view it on GitHub: https://github.com/puffnfresh/bilby.js/issues/12

elclanrs commented 10 years ago

I see the difference, but I think that bind is trying to do too much, so curry becomes slow. Bilby uses curry in many places, this optimization would improve performance a lot. Why not create a partial function, and a bind function?