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 issues (long) Date: 25 Feb 2003 21:54:51 +0100 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <87y9446pyc.fsf@zagadka.ping.de> References: <87d6lhcnyn.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 1046206595 20368 80.91.224.249 (25 Feb 2003 20:56:35 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 25 Feb 2003 20:56:35 +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 18nm7t-0005I7-00 for ; Tue, 25 Feb 2003 21:56:33 +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 18nm72-0003tJ-06 for guile-devel@m.gmane.org; Tue, 25 Feb 2003 15:55:40 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18nm6g-0003rq-00 for guile-devel@gnu.org; Tue, 25 Feb 2003 15:55:18 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18nm6B-0003jC-00 for guile-devel@gnu.org; Tue, 25 Feb 2003 15:55:18 -0500 Original-Received: from mail.dokom.net ([195.253.8.218]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18nm6A-0003ik-00 for guile-devel@gnu.org; Tue, 25 Feb 2003 15:54:46 -0500 Original-Received: from dialin.speedway43.dip188.dokom.de ([195.138.43.188] helo=zagadka.ping.de) by mail.dokom.net with smtp (Exim 3.36 #3) id 18nm6P-0001fV-00 for guile-devel@gnu.org; Tue, 25 Feb 2003 21:55:01 +0100 Original-Received: (qmail 10117 invoked by uid 1000); 25 Feb 2003 20:54:52 -0000 Original-To: Rob Browning In-Reply-To: <87d6lhcnyn.fsf@raven.i.defaultvalue.org> Original-Lines: 18 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:1974 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:1974 Rob Browning writes: > The second (perhaps related) issue involves memory use. It turns out > that an mpz_t, which is the GMP integer type, takes up a minimum of 12 > bytes (when an int is 4 bytes), and will always be more than that > because that 12 bytes doesn't include any space for the actual digits. I'm not so much worried about the size of an mpz_t but about the fact that it requires an additional malloc. 12 bytes is just right for our double cells, tho. So I would suggest making bignums a double cell and putting the mpz_t structure into slots 1, 2, and 3. There should be a test somewhere whether mpz_t really fits into this space. For now we can just wait for this test to fail, I'd say. This also removes the additional indirection. -- 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