Peter Bex <peter....@xs4all.nl> writes:
> Very clever!  I've tested and pushed this.

Cool, thank you very much!


> Are you actually using promises so much that you're running into
> performance issues with them, or was this just for fun?

I ran into memory leaks when trying to implement the lazy-seq egg based
on promises. And IIRC that was due to references that were kept in the
delay thunk's closure and thus weren't garbage collected. The
record-based implementation I came up with instead is what inspired me
to check whether the same could be applied to core. I'm now evaluating
whether using this promise implementation actually works for lazy-seq
and whether it yields any performance benefits. One drawback is that it
needs to support multi values whereas my hand-rolled version in lazy-seq
doesn't. I can post a follow-up here once I've tried it if you're
interested.

Moritz

_______________________________________________
Chicken-hackers mailing list
Chicken-hackers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-hackers

Reply via email to