comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@cs.nyu.edu (Robert Dewar)
Subject: Re: Ada vs. C
Date: 1996/08/09
Date: 1996-08-09T00:00:00+00:00	[thread overview]
Message-ID: <dewar.839592211@schonberg> (raw)
In-Reply-To: 3208F2BA.E34@freenet.scri.fsu.edu


The Quelisher says

"I have found one thing that C has an advantage over Ada : executable
file sizes. Everything I have programmed in Ada is HUGE compared to a
program thta does the same thing but written in C."


That's bogus, comparable programs in Ada and C will generate executables
of the same size, at least using a technology like GNAT. You have however
to be careful about that "comparable". Note for example that in GNAT,
by default the executable files contain debugging information which is
typically much more voluminous than the code itself -- so make sure 
you are comparing stripped file sizes. Second, in some version of GNAT,
the default is to link statically, and in others to link dynamically.
Be careful you are not comparing a statically linked Ada program to a
dynamically linked C program.

It's true that in the default configuration on some ports of GNAT, the
exe files will be bigger, due in particular to the inclusion by default
of debugging information. This choice of defaults is deliberate and
reflects the fact that disk prices have dropped dramatically, so the
gain from having the debugging information around seems worth the space
(after all a 300K file these days is occupying 5 cents worth of disk space).
Note also that it is ONLY a space issue, the debugging information is not
loaded if you are not debugging.

But anyway, if you don't want the debugging information, just make sure
it is stripped.





  reply	other threads:[~1996-08-09  0:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-08-07  0:00 Ada vs. C The Quelisher
1996-08-09  0:00 ` Robert Dewar [this message]
1996-08-09  0:00   ` The Quelisher
1996-08-10  0:00     ` Robert Dewar
1996-08-10  0:00     ` steved
1996-08-10  0:00       ` Robert Dewar
1996-08-10  0:00     ` Bob Kitzberger
1996-08-11  0:00     ` Dave Wood
1996-08-14  0:00       ` busigin
1996-08-16  0:00         ` Robert Dewar
1996-08-11  0:00     ` Jerry van Dijk
1996-08-12  0:00   ` Vladimir Vukicevic
1996-08-09  0:00 ` Jack W Scheible
1996-08-09  0:00 ` Daniel P Hudson
1996-08-09  0:00   ` Robert Dewar
  -- strict thread matches above, loose matches on Subject: below --
1995-01-20  4:43 "Subtract C, add Ada" Samuel Mize
1995-01-21 20:28 ` David O'Brien
     [not found]   ` <3g655n$q5k@theopolis.orl.mmc.com>
1995-01-30 15:33     ` Ada vs. C Martijn Bak
replies disabled

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