[gambit-list] Space leak or bad gc parameters?
lucier at math.purdue.edu
Sat May 16 19:24:01 EDT 2015
> On May 16, 2015, at 5:21 PM, Denis Fourt <denis.prog at hotmail.com> wrote:
> This week, I have implemented streams as described in SICP in Erlang. I have used Eratosthenes's sieve as a test case, as described in SICP. I already had the same algorithm in scheme.
> My implementation of force and delay in Erlang is the most basic using a thunk as a promise (memoization is rather difficult to implement in Erlang, which means that, for example, SICP implicit stream definition of the Fibonacci sequence is rather inefficient).
> On the other hand, Erlang controls much better the heap with the sieve than gsi and asking for the 100 000th prime number is just a matter of time. Gambit gsi heap grows so fast that the algorithm is just useful for teaching.
> I wondered if this difference was related to the delay/force implementation and to the place of the call to cdr (that is delayed or not). I rewrote the streams algorithms in scheme so they were as closed as possible to Erlang.
> On gsi, this has not lead to any improvement. Setting a maximum heap size has only resulted in raising an exception.
> On Scheme48, the sieve runs like in Erlang though slower. Erlang alike algorithms are nevertheless much much faster (about three times for the sieve).
> I believe Scheme48 and Erlang use the same kind of garbage collector... So is there a way to better to tune Gambit garbage collector or is this a garbage collector algorithm problem?
> Ps http://mitpress.mit.edu/sicp/full-text/book/book.html
> Gambit-list mailing list
> Gambit-list at iro.umontreal.ca
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Gambit-list