unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: "Hans Åberg" <haberg-1@telia.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: Andy Wingo <wingo@igalia.com>, Guile Devel <guile-devel@gnu.org>
Subject: Re: CPU and GC cost of bignums
Date: Wed, 5 Feb 2020 22:28:40 +0100	[thread overview]
Message-ID: <C540CAF6-FF5F-4611-A0F8-C0DF5001F340@telia.com> (raw)
In-Reply-To: <87zhdxknf9.fsf@gnu.org>


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




  reply	other threads:[~2020-02-05 21:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-04 16:56 CPU and GC cost of bignums Ludovic Courtès
2020-02-05 16:29 ` Ludovic Courtès
2020-02-05 21:28   ` Hans Åberg [this message]
2020-02-06  9:37   ` Andy Wingo
2020-02-06 13:37     ` Ludovic Courtès
2020-02-08 14:05       ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C540CAF6-FF5F-4611-A0F8-C0DF5001F340@telia.com \
    --to=haberg-1@telia.com \
    --cc=guile-devel@gnu.org \
    --cc=ludo@gnu.org \
    --cc=wingo@igalia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).