Related articles |
---|
Re: Current work in compiler/language design. sverker@sics.se (1991-11-19) |
Just how fast is LISP? pschmidt@convex.com (1991-11-20) |
Re: Just how fast is LISP? schwartz@roke.cs.psu.edu (1991-11-20) |
Re: Just how fast is LISP? barmar@think.com (1991-11-21) |
Re: Just how fast is LISP? ressler@cs.cornell.edu (1991-11-21) |
Re: Just how fast is LISP? tmb@ai.mit.edu (1991-11-21) |
Re: Just how fast is LISP? rockwell@socrates.umd.edu (Raul Deluth Miller-Rockwell) (1991-11-21) |
Re: Just how fast is LISP? hdev@ph.tn.tudelft.nl (1991-11-21) |
Re: Just how fast is LISP? simonm@dcs.glasgow.ac.uk (Simon Marlow) (1991-11-21) |
Re: Just how fast is LISP? barmar@think.com (1991-11-21) |
[2 later articles] |
Newsgroups: | comp.compilers |
From: | barmar@think.com (Barry Margolin) |
Keywords: | design, Lisp, performance |
Organization: | Thinking Machines Corporation, Cambridge MA, USA |
References: | 91-11-072 91-11-080 |
Date: | 21 Nov 91 00:23:06 GMT |
In article 91-11-080 pschmidt@convex.com (Perry Schmidt) writes:
>> After hand-tuning, adding type
>>declarations, turning on the optimizers full-blast, turning off safety,
>>sacrificing overflow checking, etc., I got these benchmarks to run close to
>>half the speed of optimized C. ...
> But what would happen if you started to do a lot of that same
>hand-tuning for the C program??
Note that most of the modifications he had to make to the Lisp program were
the kinds of things that a C programmer does as a matter of course: type
declarations, no overflow handling, no argument type checking, etc. I
think most of us will admit that Lisp can't generate as tight code on
conventional architectures when everything must dispatch on types. Lisp
gives you the choice of flexibility and ease of coding versus speed; most
other languages don't offer this choice at all.
However, things are getting pretty good. The CMU Common Lisp compiler is
supposed to be able to do quite a bit of type inferencing. For instance, I
think that in the code:
(when (typep x 'fixnum)
<code that uses x>)
the <code that uses x> will behave as if x were declared to be FIXNUM
(well, unless it's SETQ'ed).
--
Barry Margolin, Thinking Machines Corp.
barmar@think.com
{uunet,harvard}!think!barmar
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.