comp.lang.ada
 help / color / mirror / Atom feed
From: Robert Dewar <robert_dewar@my-deja.com>
Subject: Re: C/C++ programmer giving Ada95 a chance -- writing an emulator.
Date: 2000/04/06
Date: 2000-04-06T00:00:00+00:00	[thread overview]
Message-ID: <8ciddt$2v7$1@nnrp1.deja.com> (raw)
In-Reply-To: 38E8F9C4.6D0E137@cadence.com

In article <38E8F9C4.6D0E137@cadence.com>,
  Paul Graham <pgraham@cadence.com> wrote:
> It sounds like the Realia compiler ran about as fast as grep
or some
> similar text scanning program.  How did you achieve such
compiler
> speed?  Is there something about COBOL that makes it easier to
compile
> than Ada?
>
> Paul


No, in fact COBOL is a tough language to compile. But actually
in my experience, grep on many Unix machines runs dismally
slow, far slower than it should given the speed of disks,
and the speed of processors today.

Do some rough back of the envelope calculations

a 2 million line COBOL program is typically about 70 million
bytes long. Modern disks can easily read that much data in
10 seconds. Modern memories are large enough to hold all
intermediate data, so the only output is writing the object
file, and that will take less, say 5 seconds.

Now let's suppose we compile using 10,000 instructions per
line of COBOL, Realia COBOL is actually lower than this by
quite a margin but let's see where that gets us.

THat means that we need to execute 2 million x 10 thousand
instructions = 2 * 10**10 instructions.

A top of the line x86 machine (costing of the order of
$2500) has a 1 gigahertz chip capable of executing at
least two instructions per cycle in typical use, so that's
2 * 10**9 instructions per second.

So our compilation requires 10 seconds of CPU time. Since this
can be overlapped with reading the sources, there is no reason
not to expect the compilation to be finished in less than half
a minute.

Could one write an Ada compiler that compiled this fast? Yes,
but it would be a very large project. Is it worth it? No.

As machines get faster and faster, fast compilation becomes
less critical, and this trend will steadily continue.

When Realia started, it is was really interesting that we
compiled 10,000 lines/minute on a PC-1 with the competition
only compiling 1000 lines/minute.

But a few years later, when both figures were multiplied by
a large factor, this became a much less critical competitive
advantage.

I must say I do miss the days when doing a full bootstrap
of the compiler took 40 seconds with Realia COBOL, about
the time to go get another Diet Coke from the fridge, but
we are getting back to within hailing distance of that
now with recent high performance machines, and indeed if
you can afford a multi-processor top of the line SGI
machine, you can indeed get compilation speeds this fast.

I remember Jean Ichbiah in the late 80's coming up with
the term Megaloch to describe compiler speed (millions
of lines of code ber hour), and thinking we were not
far from the first megaloch Ada compiler. Interesting
that we have now overtaken that benchmark by a big factor
already.

Robert Dewar


Sent via Deja.com http://www.deja.com/
Before you buy.




  reply	other threads:[~2000-04-06  0:00 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <38e148e2.5089627@news.shreve.net>
2000-03-28  0:00 ` C/C++ programmer giving Ada95 a chance -- writing an emulator Geoff Bull
2000-03-28  0:00   ` Jean-Marc Bourguet
2000-03-28  0:00 ` Juergen Pfeifer
2000-03-28  0:00   ` Jim Rogers
2000-03-29  0:00     ` Ed Falis
2000-03-29  0:00       ` James S. Rogers
2000-03-29  0:00         ` Jean-Marc Bourguet
2000-03-29  0:00         ` Robert Dewar
2000-03-30  0:00         ` Geoff Bull
2000-03-30  0:00           ` tmoran
2000-04-01  0:00           ` Robert Dewar
2000-03-28  0:00 ` Ken Garlington
     [not found] ` <38e19656.17008608@news.shreve.net>
2000-03-29  0:00   ` swhalen
2000-03-29  0:00     ` Robert Dewar
2000-03-30  0:00       ` swhalen
2000-03-29  0:00   ` Marin D. Condic
2000-03-29  0:00   ` David Starner
2000-03-29  0:00     ` Robert A Duff
2000-03-30  0:00       ` Geoff Bull
2000-04-01  0:00         ` Robert Dewar
2000-03-29  0:00     ` Robert Dewar
2000-03-29  0:00       ` Marin D. Condic
2000-03-29  0:00         ` Robert A Duff
2000-03-29  0:00           ` Marin D. Condic
2000-03-29  0:00       ` Jean-Marc Bourguet
2000-03-29  0:00         ` Robert Dewar
2000-03-30  0:00           ` Jean-Marc Bourguet
2000-04-01  0:00             ` Robert Dewar
2000-03-30  0:00       ` Geoff Bull
2000-04-01  0:00         ` Robert Dewar
2000-04-02  0:00           ` Geoff Bull
2000-04-02  0:00             ` Robert Dewar
2000-04-02  0:00             ` swhalen
2000-03-29  0:00   ` Marc A. Criley
2000-03-30  0:00   ` Ken Garlington
2000-03-30  0:00   ` Samuel T. Harris
2000-04-01  0:00     ` Robert Dewar
2000-04-05  0:00       ` Robert A Duff
2000-03-30  0:00 ` Geoff Bull
     [not found]   ` <38e7e951.8384503@news.shreve.net>
2000-04-02  0:00     ` Jean-Pierre Rosen
2000-04-02  0:00       ` Robert Dewar
2000-04-03  0:00         ` Paul Graham
2000-04-06  0:00           ` Robert Dewar [this message]
2000-04-06  0:00             ` Larry Kilgallen
2000-04-06  0:00               ` Robert Dewar
2000-04-06  0:00                 ` Gautier
2000-04-07  0:00                   ` Robert Dewar
2000-04-07  0:00                     ` Gautier
     [not found] <38E3DBD7.27F5B246@acenet.com.au>
2000-03-31  0:00 ` tmoran
2000-03-31  0:00   ` Geoff Bull
2000-04-01  0:00     ` Tucker Taft
2000-04-02  0:00       ` Robert Dewar
2000-04-02  0:00         ` Geoff Bull
2000-04-02  0:00       ` Geoff Bull
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox