> On 5 Feb 2020, at 17:29, Ludovic Courtès <l...@gnu.org> wrote: > > Hey ho! > > Ludovic Courtès <l...@gnu.org> 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.