[Top][All Lists]

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

Re: CPU and GC cost of bignums

From: Hans Åberg
Subject: Re: CPU and GC cost of bignums
Date: Wed, 5 Feb 2020 22:28:40 +0100

> On 5 Feb 2020, at 17:29, Ludovic Courtès <address@hidden> wrote:
> Hey ho!
> Ludovic Courtès <address@hidden> skribis:
>> … but has the disadvantage that it doesn’t work: ‘numbers.test’ fails
>> badly on bignums.
> I think with the excitement I no longer knew what I was saying.  So,
> here’s a revised patch that actually preserves memory management (as in:
> ‘mpz_t’ are eventually freed), while getting rid of finalizers.

When I tested the Boehm GC in a C++ program, the finalizers did not seem to 
make much difference. However, if the program is threaded, it puts locks around 
all GC allocations, which I think may be time consuming. So maybe you should 
try letting GMP use ordinary malloc, and GC allocations only for the SCM values 
creating them, deleting when finalized.

reply via email to

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