Re: Unsafe Optimizations (formerly Compiler Design in C...)

Ken Dickey <kend%mrloog.wr.tek.com@RELAY.CS.NET>
Thu, 21 Jun 90 18:45:47 GMT

          From comp.compilers

Related articles
[10 earlier articles]
Re: Unsafe Optimizations (formerly Compiler Design in C...) henry@zoo.toronto.edu (1990-06-20)
Re: Unsafe Optimizations (formerly Compiler Design in C...) dan@kfw.com (1990-06-20)
Re: Unsafe Optimizations (formerly Compiler Design in C...) chip@tct.uucp (1990-06-20)
Re: Unsafe Optimizations (formerly Compiler Design in C...) grunwald@foobar.Colorado.EDU (Dirk Grunwald) (1990-06-20)
Re: Unsafe Optimizations (formerly Compiler Design in C...) marti@inf.ethz.ch (1990-06-21)
Re: Unsafe Optimizations (formerly Compiler Design in C...) pardo@june.cs.washington.edu (1990-06-21)
Re: Unsafe Optimizations (formerly Compiler Design in C...) kend%mrloog.wr.tek.com@RELAY.CS.NET (Ken Dickey) (1990-06-21)
Re: Unsafe Optimizations (formerly Compiler Design in C...) chittamu@dino.cs.umass.edu (1990-06-22)
Re: Unsafe Optimizations (formerly Compiler Design in C...) harrison@necssd.NEC.COM (1990-06-23)
| List of all articles for this month |

Newsgroups: comp.compilers
From: Ken Dickey <kend%mrloog.wr.tek.com@RELAY.CS.NET>
References: <1990Jun15.033356.2061@esegue.segue.boston.ma.us> <1990Jun12.163959.2593@esegue.segue.boston.ma.us> <1990Jun14.152612.2374@esegue.segue.boston.ma.us> <1990Jun21.033044.2776@esegue.segue.boston.ma.us>
Date: Thu, 21 Jun 90 18:45:47 GMT
Organization: Tektronix, Inc., Beaverton, OR.
Original-sender: news%wrgate.wr.tek.com@RELAY.CS.NET
Keywords: compiler design, C, unsafe optimizations, language bashing

In article <1990Jun21.033044.2776@esegue.segue.boston.ma.us> marti@inf.ethz.ch writes:
>> LISP usually has to do garbage collection whether or not it's compiled,
>> and all LISP programs are not compilable since LISP code can be self
>> modifying.
>
>While I agree with this, it only means that on today's typical hardware
>architectures with todays typical LISP compiler/interpreter technology, LISP
>program is very likely to be slower than an equivalent (whatever that exactly
>means) C program. Moreover, having garbage collection saves you from doing
>your own memory management, so the average LISP program will turn out to be
>shorter. Hence, you might call LISP a slower, but more powerful language.




You might want to take a look at modern dialects such as Scheme. The T
system from Yale, for example, always compiles code--even in interpreted
mode. They just use a cheaper version of the compiler [`compile and
execute']. I can't speak for CommonLisp, but the newer Scheme compilers
are competative in code speed and space with C [e.g. T's Orbit compiler,
Brandeis's Gambit compiler].


As to the efficency of automatic storage management (a.k.a garbage
collection):


[1] while early Lisps [e.g. LISP 1.5] consumed 40% of CPU
cycles in gc, modern collectors consume 2-3%;


[2] a study of where programmers' time is spent has shown that
40% of the development time for large projects is spent in manual storage
management {alloc/free; time lost to debugging defererences to bogus
[uninitialized or dangling] pointers, etc}.


[I believe it was a study at PARC using the Cedar language, which is why
Mesa has automatic storage management].




I will say here before I get totally flamed, that performance measures
are typically very slippery things. If you are very interested, we can
start looking at specific examples and assumption sets. Having said
that, I will state that automatic storage management certainly wins in
shortening system development time.


In passing, I might note that LISP is a *family* of languages. It would
be helpful to discuss individuals [C, Pascal, and Algol68 are all in the
ALGOL family but we don't call them all ALGOL].




-Ken Dickey kend@mrloog.WR.TEK.COM
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.