chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] [PATCH] Slight promise efficiency and memory impro


From: Peter Bex
Subject: Re: [Chicken-hackers] [PATCH] Slight promise efficiency and memory improvements
Date: Mon, 5 Nov 2012 19:59:16 +0100
User-agent: Mutt/1.4.2.3i

On Mon, Nov 05, 2012 at 04:25:18PM +0100, Moritz Heidkamp wrote:
> Dear Chickeneers,
> 
> the attached patch changes the implementation of promises to be slightly
> more efficient when forcing a promise more than once (one procedure call
> less). Also, instead of keeping the promise result in the promise
> thunk's closure it is now kept in a slot of the promise structure. This
> allows for removing the reference to the thunk once the promise has been
> forced and thus saving some memory.

Very clever!  I've tested and pushed this.

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

Cheers,
Peter
-- 
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music."
                                                        -- Donald Knuth



reply via email to

[Prev in Thread] Current Thread [Next in Thread]