In https://Clara.io we identified that _.each() and other types of function-based helpers were incredibly slow (even lodash was slow) and we had to replace these constructs in performance critical areas with raw for-loops. Three.JS we also did this.
What problem does this solve? It seems to trade more-verbose code for being more performant in large datasets. That seems reasonable. But otherwise, in day-to-day code why would I use this?
The goal is to be less-verbose.
You are able to use tansducer-based functions (map, filter, ...) on any datastructure that is iterable. For me, performance is a bonus.
I do not know how this compares to a monad/monoid. If anyone can explain, please go ahead. Thx!
> Time should be on the x-axis. Independent variables on the x-axis and dependent variables on the y.
The graph is correct - the independent variables in this case are the number of items in the array (the x axis) and the library being tested (each line).
The dependent variable in this case is time - which is why it is on the y axis.
[+] [-] bhouston|11 years ago|reply
[+] [-] cdsanchez|11 years ago|reply
[+] [-] ricardobeat|11 years ago|reply
edit: added lazy.js to the benchmark and transducers.js wins hands down. Lazy also starts way behind _/lodash and only catches up after >50k elements.
[+] [-] est|11 years ago|reply
https://news.ycombinator.com/item?id=8439547
transducers in Python
https://news.ycombinator.com/item?id=8444894
[+] [-] Touche|11 years ago|reply
[+] [-] juliangamble|11 years ago|reply
http://gigasquidsoftware.com/blog/2014/09/06/green-eggs-and-...
(note this is in Clojure not JavaScript - but the ideas and usages are the same).
[+] [-] Thomasdah|11 years ago|reply
I do not know how this compares to a monad/monoid. If anyone can explain, please go ahead. Thx!
[+] [-] coldtea|11 years ago|reply
[+] [-] thesorrow|11 years ago|reply
[+] [-] kbeaty|11 years ago|reply
[1]: https://news.ycombinator.com/item?id=8447046
[+] [-] unknown|11 years ago|reply
[deleted]
[+] [-] jamesrom|11 years ago|reply
EDIT: To clarify, plotting 'seconds' over 'items per second' is needlessly confusing.
[+] [-] dancole|11 years ago|reply
Correct. The independent variable being the number of items and the dependent variable being the time it takes to run said number of items.
>> Time should be on the x-axis.
Time should be on the y-axis. It's the time it takes to execute, given a set of items.
[+] [-] nmjohn|11 years ago|reply
The graph is correct - the independent variables in this case are the number of items in the array (the x axis) and the library being tested (each line).
The dependent variable in this case is time - which is why it is on the y axis.
[+] [-] mattdeboard|11 years ago|reply
> The graph below shows the time it took to run versus the size of [the array]