Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!snorkelwacker!ai-lab!zurich.ai.mit.edu!jinx From: jinx@zurich.ai.mit.edu (Guillermo J. Rozas) Newsgroups: comp.lang.scheme Subject: Re: Scheme performance Message-ID: Date: 14 Oct 90 12:40:24 GMT References: <9010140147.AA29045@seymour.mlb.semi.harris.com> Sender: news@ai.mit.edu Reply-To: jinx@zurich.ai.mit.edu Organization: M.I.T. Artificial Intelligence Lab. Lines: 57 In-reply-to: swk@mlb.semi.harris.COM's message of 14 Oct 90 01:47:26 GMT In article <9010140147.AA29045@seymour.mlb.semi.harris.com> swk@mlb.semi.harris.COM ("Song W. Koh") writes: Path: ai-lab!snorkelwacker!bloom-beacon!mlb.semi.harris.COM!swk From: swk@mlb.semi.harris.COM ("Song W. Koh") Newsgroups: comp.lang.scheme Date: 14 Oct 90 01:47:26 GMT Sender: root@athena.mit.edu (Wizard A. Root) Organization: The Internet Lines: 24 Thanks for the many replies. The replies requested the following information. Scheme Microcode Version 10.86 MIT Scheme, unix [bsd] version Scheme saved on Monday June 25, 1990 at 8:17:14 AM Release 7.0.0 (beta) Microcode 10.86 Runtime 14.46 SF 4.8 Running on Sun4, SunOS Release 4.0.3 The Lucid code was comiled and has many declarations. The Scheme code was compiled using (sf "quickprop.scm"). Song Koh Harris Semiconductor Phone: (407)-724-7085 Internet: swk@mlb.semi.harris.com Two comments: - sf is NOT a native code compiler. It is an SCode level optimizer. SCode is the internal language that the interpreter understands. The difference in time that you are observing is probably mostly the difference between interpretation and native code compilation. Note that the native code compiler is called cf and calls sf as one of its passes. Unfortunately, there is no back end for Sun4s. - sf will have almost no effect, and cf will not do very well if you do not precede your code with (declare (usual-integrations)) This declares to sf (and therefore cf) that often-used Lisp variables (+, cons, car, etc.) will have their usual values at run time, and thus they can be early bound and inline coded. If this is not done, each call to these common variables will result in an out-of-line call in the resulting code, rather than the few instructions that could be generated for them.