Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compare current fusion with closure trees to array structure based one #215

Open
davidchase opened this issue Mar 7, 2018 · 5 comments
Open

Comments

@davidchase
Copy link
Member

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.

@Frikki
Copy link
Member

Frikki commented May 11, 2018

Could you provide a link to current code implementation, @davidchase ?

@briancavalier
Copy link
Member

briancavalier commented May 11, 2018

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/

@davidchase
Copy link
Member Author

@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 :)

@frank-dspeed
Copy link

why should we degrade most to stackless ? then we could simply export [] === Stream and we can apply map filter and such stuff on that 🗡️

@briancavalier
Copy link
Member

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants