Live data from Hacker News

Transducers.js Round 2 with Benchmarks

jlongster.com

11–20 of 22 posts

Re: Transducers.js Round 2 with Benchmarks

#14
post #13

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?

This is an example usage based on Dr Seuss: "Green Eggs and Transducers" via @gigasquid

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).

Re: Transducers.js Round 2 with Benchmarks

#15
post #13

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?

Because lots of day-to-day uses large datasets? Especially since 10,000 item array is considered "large" from that perspective.

Re: Transducers.js Round 2 with Benchmarks

#16

I'd be really interested in knowing how it compares against lazy.js: http://danieltao.com/lazy.js/

My thoughts. 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.

What about transducer support in David Nolen's mori library?

https://github.com/swannodette/mori

I would be interested to know how its transducer support and performance compares to transducers.js.

Re: Transducers.js Round 2 with Benchmarks

#20
post #13

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!

Post reply on HN