From: Marius Vollmer <mvo@zagadka.de>
Cc: guile-devel@gnu.org
Subject: Re: GMP bignum results using double cells.
Date: 27 Feb 2003 14:33:50 +0100 [thread overview]
Message-ID: <87k7fl6e69.fsf@zagadka.ping.de> (raw)
In-Reply-To: <878yw3o8rd.fsf@raven.i.defaultvalue.org>
Rob Browning <rlb@defaultvalue.org> writes:
> It looks like the new code is substantially better than 1.7, though if
> I understand correctly, and gc time is included in user time, then it
> appears the improvement was on the gc side, not the computation side.
That looks very good to me. Certainly good enough to integrate it
into the 1.7 branch.
> Marius, for now, rather than use SCM_CELL_ADDR_1, I mirrored the
> handling of real values like this:
>
> #define SCM_I_BIG_MPZ(x) (((scm_t_big_mpz *) SCM2PTR (x))->mpz)
> #define SCM_BIGP(x) (!SCM_IMP (x) && SCM_TYP16 (x) == scm_tc16_big)
>
> typedef struct scm_t_big_mpz
> {
> SCM type;
> mpz_t mpz;
> } scm_t_big_mpz;
>
> However, this means that numbers.h now has to include gmp.h, and with
> the SCM_CELL_ADDR_1 approach, it wouldn't. I'd be happy to arrange
> things whichever way you prefer.
Do we need to define scm_t_big_mpz in numbers.h? Couldn't it just be
an declared-but-undefined struct there? Like
#define SCM_I_BIG_MPZ(x) (((scm_t_big_mpz *) SCM2PTR (x))->mpz)
#define SCM_BIGP(x) (!SCM_IMP (x) && SCM_TYP16 (x) == scm_tc16_big)
typedef struct scm_t_big_mpz scm_t_big_mpz;
and later in numbers.c
struct scm_t_big_mpz
{
SCM type;
mpz_t mpz;
};
> Also, I was trying to figure out how to add the test for
>
> sizeof (mpz_t) <= 3 * (sizeof (scm_t_bits))
>
> In order to put it in configure.in, we have to have access to the
> definition of scm_t_bits (or at least SIZEOF_SCM_T_BITS) at configure
> time. Any thoughts?
We can also put the test somewhere in init.c and have Guile abort
noisily when it fails.
--
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3 331E FAF8 226A D5D4 E405
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
next prev parent reply other threads:[~2003-02-27 13:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-26 6:28 GMP bignum results using double cells Rob Browning
2003-02-26 21:54 ` Kevin Ryde
2003-02-27 1:27 ` Rob Browning
2003-02-28 22:45 ` Kevin Ryde
2003-02-27 13:33 ` Marius Vollmer [this message]
2003-02-27 16:43 ` Rob Browning
2003-02-27 17:16 ` Rob Browning
2003-02-27 17:46 ` Marius Vollmer
2003-02-27 17:55 ` Rob Browning
2003-03-01 13:43 ` Marius Vollmer
2003-03-02 0:52 ` Rob Browning
2003-03-02 1:40 ` Marius Vollmer
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=87k7fl6e69.fsf@zagadka.ping.de \
--to=mvo@zagadka.de \
--cc=guile-devel@gnu.org \
/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).