[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] [PATCH] Slight promise efficiency and memory impro
From: |
Moritz Heidkamp |
Subject: |
Re: [Chicken-hackers] [PATCH] Slight promise efficiency and memory improvements |
Date: |
Mon, 05 Nov 2012 20:07:53 +0100 |
Peter Bex <address@hidden> 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