guile-devel
[Top][All Lists]
Advanced

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

Re: gmp issues (long)


From: Rob Browning
Subject: Re: gmp issues (long)
Date: Tue, 25 Feb 2003 16:50:36 -0600
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-pc-linux-gnu)

Marius Vollmer <address@hidden> writes:

> The way I understand things, GMP does not allocate the mpz_t's itself,
> right?  Then you should be able to do things like
>
>    SCM z = scm_double_cell (bignum_tag, 0, 0, 0);
>    mpz_init (SCM_CELL_ADDR_1 (z));

> where SCM_CELL_ADDR_1 or something similar needs to be added to gc.h.

Hmm.  Yep, that should work, and would be even faster.

Any easy way we could rearrange things to that we allocate a double
cell without initializing its fields at all (until the mpz_init),
i.e. save the redundant init to 0, without causing trouble with the
GC?

Anyway, thanks for the suggestion.  I think I can get this working
pretty quickly so we can see how it fares.  It'd be nice if it helps
out noticably on the performance side too...

-- 
Rob Browning
rlb @defaultvalue.org, @linuxdevel.com, and @debian.org
Previously @cs.utexas.edu
GPG starting 2002-11-03 = 14DD 432F AE39 534D B592  F9A0 25C8 D377 8C7E 73A4




reply via email to

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