Article View: comp.lang.clos
Article #310Re: Built-in functions (was Re: Beginner's Question - CLOS)
From: kanderso
Date: Wed, 07 Oct 1992 11:04
Date: Wed, 07 Oct 1992 11:04
43 lines
2663 bytes
2663 bytes
To: comp.lang.clos@cis.ohio-state.edu Date: 20 Sep 92 14:18:02 GMT Organization: School of Mathematics, University of Bath, UK From: C D Burdorf <mascdb@gdr.bath.ac.uk> Sender: commonloops-request@cis.ohio-state.edu References: <9209181825.AA08510@thelonius.mitre.org>.edu Subject: Re: Built-in functions (was Re: Beginner's Question - CLOS) In article <9209181825.AA08510@thelonius.mitre.org> john@linus.mitre.org writes: > >True, but many (most?) of the "built-in" functions in a Lisp >implementation are neither implemented in assembly language, nor are >they usually open-coded into calling code. I'm suprised people are arguing with me on this point. I C coded the exponential distribution function and did a foreign function interface to CMU Lisp and it was many times faster than what the CMU common lisp compiler could produce with declares and speed at 3 and safety at 0. I've seen over and over again cases where people can write assembly code that is faster than what Lisp compilers produce. HCL is a very fast (on sun3's) lisp and part of the reason is that much of it is written in assembly language. To avoid comparing apples to oranges, it might be helpful to get examples of code from people who have been commenting about performance of C and Lisp. Often when someone rewrites software, it has different performance characteristics the second time. For example, porting to a parallel processor can make your code faster even on a uniprocessor, if you spend more time worrying about performance than you did when your first wrote your algorithm. I can imagine that simply proclaiming speed 3 and saftey 0 may not help performance much unless you do other things too. For example, if your Lisp conses floats, or your algorithm uses trig functions that require crossing the Lisp/C boundary a lot. I can imaging that there must be things that are equally fast in C, assembly, or Lisp. For example, a properly declared (AREF X 3) is still only 1 instruction in all these languages.
Technical Details
Message-ID:
<9210071901.AA12962@news.cis.ohio-state.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!ogicse!uwm.edu!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!bbn.com!kandersoReferences:
<1992Sep20.141802.4612@gdr.bath.ac.uk>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!ogicse!uwm.edu!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!bbn.com!kanderso From: kanderso@bbn.com Newsgroups: comp.lang.clos Subject: Re: Built-in functions (was Re: Beginner's Question - CLOS) Message-ID: <9210071901.AA12962@news.cis.ohio-state.edu> Date: 7 Oct 92 11:04:21 GMT Article-I.D.: news.9210071901.AA12962 References: <1992Sep20.141802.4612@gdr.bath.ac.uk> Sender: daemon@cis.ohio-state.edu Organization: The Ohio State University Department of Computer and Information Science Lines: 43