From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Marius Vollmer Newsgroups: gmane.lisp.guile.devel Subject: Re: GMP bignum results using double cells. Date: 27 Feb 2003 14:33:50 +0100 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <87k7fl6e69.fsf@zagadka.ping.de> References: <878yw3o8rd.fsf@raven.i.defaultvalue.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1046353047 13378 80.91.224.249 (27 Feb 2003 13:37:27 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 27 Feb 2003 13:37:27 +0000 (UTC) Cc: guile-devel@gnu.org Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18oOE1-0003Tc-00 for ; Thu, 27 Feb 2003 14:37:26 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18oOCA-0001hh-0A for guile-devel@m.gmane.org; Thu, 27 Feb 2003 08:35:30 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18oOBJ-000145-00 for guile-devel@gnu.org; Thu, 27 Feb 2003 08:34:37 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18oOAx-0000Uu-00 for guile-devel@gnu.org; Thu, 27 Feb 2003 08:34:18 -0500 Original-Received: from [129.217.163.6] (helo=zagadka.ping.de) by monty-python.gnu.org with smtp (Exim 4.10.13) id 18oOAd-0008C2-00 for guile-devel@gnu.org; Thu, 27 Feb 2003 08:33:56 -0500 Original-Received: (qmail 30416 invoked by uid 1000); 27 Feb 2003 13:33:51 -0000 Original-To: Rob Browning In-Reply-To: <878yw3o8rd.fsf@raven.i.defaultvalue.org> Original-Lines: 54 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Developers list for Guile, the GNU extensibility library List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:1988 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:1988 Rob Browning 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