core
core copied to clipboard
Compare current fusion with closure trees to array structure based one
Based on Slack discussion with @briancavalier we would want to research the potentially differences (specifically performance) with current fusion implementation using closure tree structures compared to fusion using array structures.
Currently we have composition for something like Map fusion or map.map which simply looks like compose(f, source.f)
The array fusion would simply hold the functions inside an array [f, source.f, ...] and then apply the array to the source values.
Could you provide a link to current code implementation, @davidchase ?
A recent discussion in gitter reminded me of this post, which explored this idea in Scala: https://mpilquist.github.io/blog/2017/03/11/stackless-function-composition/
@Frikki sure check out under src/fusion or this link and line number
https://github.com/mostjs/core/blob/master/packages/core/src/fusion/Map.js#L34
@briancavalier thanks for sharing 👍 the author is a local and went to same school as me.. small world :)
why should we degrade most to stackless ? then we could simply export [] === Stream and we can apply map filter and such stuff on that :dagger:
Hi @frank-dspeed. I'm not quite sure what you mean by "degrade most to stackless". Could you explain more and help us understand what you mean?