Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!wuarchive!udel!rochester!pt.cs.cmu.edu!o.gp.cs.cmu.edu!ram From: ram+@cs.cmu.edu (Rob MacLachlan) Newsgroups: comp.lang.scheme Subject: Re: Benchmarking Scheme Message-ID: <1991May4.011954.9118@cs.cmu.edu> Date: 4 May 91 01:19:54 GMT References: <1991May2.155838.20830@bronze.ucs.indiana.edu> <1991May3.172024.21889@cs.cmu.edu> Sender: netnews@cs.cmu.edu (USENET News Group Software) Distribution: comp.lang.scheme Organization: School of Computer Science, Carnegie Mellon Lines: 44 I'd like to clarify my intent here. Of course, part of the reason I posted was that I couldn't miss a chance to brag about my spiffy new compiler. But the main reason was that I didn't want to let go unchallenged the claim that Lisp (or any language with dynamic typing, generic arithmetic and GC) will be 8 times slower than C. Any powerful language feature sometimes hurts performance, but implementors can insure that you only get hurt when you play with the sharp edges. This means that there is not a straightforward product combination of inefficiency when you have a language with several potentially inefficient features. How do you know that QUOTIENT or FORMAT (for example) may not error, [...] I think that it is almost impossible to know. [...] any potentially assigned variables must be on the heap Yeah, I guess it can get weedy if you aren't willing to restrict the extent of continuations created in the debugger. But if you don't have word integers, this program will still perform terribly even if you do change to Scheme's idiomatic iteration. You should be able to get reasonable performance in pretty much any Lisp by changing the program to use FIXNUM arithmetic and adding any necessary declarations. CMU CL has an edge here because: -- You don't have to change the program. -- You don't have to add declarations out the wazoo. -- Code runs reasonably fast, even with full type checking. [...] it seems that you changed the program, and that there are declarations up the wazoo, although perhaps less than in other dialects of CL. I like the fact that you don't have to insert THE everywhere, but I still think that this is a far cry from what you seem to imply. Well, I guess my wazoo is different than yours. I meant: -- I didn't have to understand how the program worked to change it. I only changed syntax and added some declarations (which I reverse-engineered from the knowledge that long == (signed-byte 32), and that the maximum N the C program allowed was 1000.) [I also couldn't resist the temptation to clarify the program by using FORMAT...] -- There are no THE declarations. -- Safety does not mean generic arithmetic in CMU CL (though the time I reported time was unsafe.) Robert MacLachlan (ram+@cs.cmu.edu)