guile-user
[Top][All Lists]
Advanced

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

Re: out-of-control GC


From: David Kastrup
Subject: Re: out-of-control GC
Date: Sun, 10 Sep 2017 20:03:57 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Arne Babenhauserheide <address@hidden> writes:

> Hi Linas,
>
>
> Linas Vepstas <address@hidden> writes:
>
>> To make this conversation less crazy, and more down-to-earth, here is a
>> demo that seems to spend most of its time in GC. Hard for me to to say that
>> this is "wrong", right now, but it illustrates the scandalous nature of the
>> problem.
>
> Do you have many string operations in your code?
>
> If I replace
>
>     (cons (format #f "~A" cnt) lis)
>
> with
>
>     (cons cnt lis)
>
> GC is down to ~20% (from around 130%).

But the main point of using format (rather than string appends) is to
avoid creating lots of garbage-collected temporary expressions.  A
factor of 6 seems to suggest that this expectation is not actually being
accommodated.

-- 
David Kastrup




reply via email to

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