-
Notifications
You must be signed in to change notification settings - Fork 21
stack safe #12
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
stack safe #12
Conversation
cfd2003
to
63b5f83
Compare
This is worth to still have in mind purescript-deprecated/purescript-eff#31 (comment) |
"name": "purescript-eff-aff-bench", | ||
"dependencies": { | ||
"purescript-minibench": "^2.0.0", | ||
"purescript-effect": "safareli/purescript-effect#fast", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💀 this should be updated before merge
In this PR I have added some explanation of how FFI part works. |
There might be concern about portability of code relying on stack safety of Effect. For that to not be an issue other backends should make there Effect implementation stack safe too. The implementation here is not too complex, but it preserves original Eff runtime representation by using JS function as an object. I'm not sure if functions can have properties in c++ or Go or rlang like in JS. If all this languages support similar feature then this implementation can be ported and runtime representation preserved. otherwise if stack safety is desired in other backends, just a regular tree like representation should be used with some |
ping |
While I do think this is really cool and useful, I don't think this is something that we can merge as part of core |
That strange/unintuitive condition can be "fixed" by removing that compiler optimization. So choice is between having compiler optimization and no stack safety OR removing compiler optimization and having library level stack safety. But as this PR was hanging around for over 2 years, I guess stack safety at the cost of the compiler optimization is not acceptable so closing. |
I do not consider removing the optimization acceptable. It's the only reason why things like halogen-vdom can even be written with acceptable performance. |
fix #9
updated work made in purescript-deprecated/purescript-eff#31
benchmark