From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: prj@po.cwru.edu (Paul Jarc) Newsgroups: gmane.lisp.guile.devel Subject: Re: The relationship between SCM and scm_t_bits. Date: Tue, 04 May 2004 13:16:22 -0400 Organization: What did you have in mind? A short, blunt, human pyramid? Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1083691608 5387 80.91.224.253 (4 May 2004 17:26:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 4 May 2004 17:26:48 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue May 04 19:26:38 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BL3gk-0007sY-00 for ; Tue, 04 May 2004 19:26:38 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BL3gT-0000iW-Uh for guile-devel@m.gmane.org; Tue, 04 May 2004 13:26:21 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1BL3dS-0007iJ-RD for guile-devel@gnu.org; Tue, 04 May 2004 13:23:14 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1BL3cB-0007DS-41 for guile-devel@gnu.org; Tue, 04 May 2004 13:22:26 -0400 Original-Received: from [129.22.104.47] (helo=mirapoint2.tis.cwru.edu) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.30) id 1BL3Xa-0005bk-8L for guile-devel@gnu.org; Tue, 04 May 2004 13:17:10 -0400 Original-Received: from multivac.cwru.edu (multivac.ITS.CWRU.Edu [129.22.114.26]) by mirapoint2.tis.cwru.edu (MOS 3.4.3-CR) with SMTP id BAV47173; Tue, 4 May 2004 13:16:24 -0400 (EDT) Original-Received: (qmail 14959 invoked by uid 500); 4 May 2004 17:16:46 -0000 Original-To: Marius Vollmer In-Reply-To: (Marius Vollmer's message of "Tue, 04 May 2004 15:53:23 +0200") Mail-Copies-To: nobody Mail-Followup-To: Marius Vollmer , guile-devel@gnu.org Original-Lines: 40 User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (gnu/linux) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:3668 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:3668 Marius Vollmer wrote: > Now, the distinction between scm_t_bits and SCM is only then practical > when converting between them has zero cost. SCM_PACK and SCM_UNPACK > can really only be casts that reinterpret the bits. Looking at the case of SCM_DEBUG_TYPING_STRICTNESS == 2, I'd expect that scm_pack might be optimized away, so it would have no run-time cost. (At least, the compiler has enough information to do so, and the C standard allows it.) If that isn't happening already, maybe marking it as inline would help? > Thus, scm_t_bits and SCM can be pretty much identical and we can allow > the casting of pointers to them, too. The C standard does not allow accessing a value through a pointer to a different type. Newer versions of gcc have optimizations depending on that restriction included in -O2. You can disable those optimizations with -fno-strict-aliasing, but maybe those optimizations would outweigh some nonzero-cost conversion between scm_t_bits and SCM. Some profiling would be useful. > Pointers to scm_t_bits might still fail on strange platforms and we > might then consider removing SCM_CELL_WORD_LOC on those platforms. Better to make Guile the same on all platforms, I think, and so remove it on all platforms if it doesn't work on some. Granted that it's useful to have both SCM and scm_t_bits, what exactly is the advantage in using those two types to alias the same bytes in memory? What do we gain here over your previous use-SCM-everywhere suggestion? > But we would need a very good reason for this: using pointers the > way delete_some does is completely reasonable right now. Well, it's expected to be reasonable, but turns out to be not quite so, right? Hence the issue. paul _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel