Newsgroups: comp.lang.lisp
Path: cantaloupe.srv.cs.cmu.edu!das-news.harvard.edu!news2.near.net!MathWorks.Com!europa.eng.gtefsd.com!newsxfer.itd.umich.edu!uunet!sytex!smcl
From: smcl@sytex.com (Scott McLoughlin)
Subject: Re: Comparison: Beta - Lisp
Message-ID: <VNJesc1w165w@sytex.com>
Keywords: lisp, c, gcc
Sender: bbs@sytex.com
Organization: Sytex Access Ltd.
References: <34qbac$ohk@infosrv.edvz.univie.ac.at>
Date: Fri, 9 Sep 1994 20:19:54 GMT
Lines: 34

bernhard@ai.univie.ac.at (Bernhard Pfahringer) writes:

> May not be the case: I've timed your function using both CMUCL 17c and
> Lucid CL 4.0.0, CMUCL is 3 times faster than Lucid, so:
>          CMUCL  (estimate!)                15 sec
> 
> which is just a factor of 2 off of C. And here is a possible explanation
> of that remaining factor: I *guess* svref still checks, if the index is
> within the bounds of the vector, whereas there is probably no such check
> in the binary produced by the C compiler.
> 
> regards, Bernhard
> --------------------------------------------------------------------------
> Bernhard Pfahringer
> Austrian Research Institute for  
> Artificial Intelligence          bernhard@ai.univie.ac.at 
> Schottengasse 3                  Fax:   (+43 1) 532-0652
> A-1010 Vienna, Austria           Phone: (+43 1) 533-6112
> 

Howdy,
        SVREF bounds checks an index with (SAFETY 0)? Weird. Of all
things to optimize, you'd think that "field dereferencing" functions
, e.g., SVREF, SCHAR, <STRUCT>-<SLOT> references, and their builtin
counter parts like SYMBOL-NAME, would not type check and would not
bound's check.
        I'd think that it would be pretty easy to group these
functions where the compiler can see'em and generate a single
machine instruction on most processors.

=============================================
Scott McLoughlin
Conscious Computing
=============================================
