comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Suitability of Ada as a general-purpose language
Date: Mon, 30 Jul 2012 23:19:58 -0500
Date: 2012-07-30T23:19:58-05:00	[thread overview]
Message-ID: <jv7mdh$to2$1@munin.nbi.dk> (raw)
In-Reply-To: jv70gq$v6u$1@dont-email.me

"Brian Drummond" <brian@shapes.demon.co.uk> wrote in message 
news:jv70gq$v6u$1@dont-email.me...
...
> Executable size is a poor measure of efficiency; the Ada runtime system
> (RTS) provides a LOT of facilities that "Hello World" doesn't need. Any
> decent sized application will need them, whatever language it is written
> in.

Right. We used to tell people that back in the early days of Ada, but few 
people bought that argument.

> It is probably not worth crafting a specially small RTS just to make Ada
> look good on "Hello World" benchmarks! However it could be done...

It's not really the runtime so much as to how smart the binder is at not 
including unneeded stuff. Janus/Ada has subprogram-level trimming of all Ada 
code and the entire runtime; we got executables in the 5-7K range on MS-DOS. 
For Windows, we can't do as well, because we get all kinds of cruft from the 
OS interface. But it's still reasonably small. After all, hardly any program 
uses all of the routines in Text_IO (in programs we checked, the average was 
less than 40%). Janus/Ada also trims subprograms that are primitive for 
tagged types but never called (this requires tracking dispatching calls) --  
we did that to make Claw programs have sane sizes.

The real problem is having to use system linkers, which never have the 
needed facilities (at least, not facilities that actually work). Janus/Ada 
always pre-links the Ada code in order to do proper trimming, but that adds 
a step so I understand why other compilers don't use it.

Of course, this effort is worthwhile on any program where the size is 
relevant; it's just not silly benchmarks (although its more obvious with the 
benchmarks).

                                                 Randy. 





  reply	other threads:[~2012-08-07  6:43 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-30 11:43 Suitability of Ada as a general-purpose language Dufr
2012-07-30 12:12 ` Patrick
2012-07-30 12:37 ` Georg Bauhaus
2012-07-30 13:27   ` Patrick
2012-07-30 13:45     ` Dmitry A. Kazakov
2012-07-30 13:50       ` Patrick
2012-07-30 13:55         ` Patrick
2012-07-30 14:14         ` Dmitry A. Kazakov
2012-07-30 13:04 ` francois_fabien
2012-07-30 13:45 ` Vasiliy Molostov
2012-07-30 13:55   ` Vasiliy Molostov
2012-07-31 14:28   ` Marc C
2012-08-04 14:07     ` Vasiliy Molostov
2012-07-30 14:19 ` Ludovic Brenta
2012-07-30 14:34   ` Yannick Duchêne (Hibou57)
2012-07-30 15:26     ` Dufr
2012-07-30 16:05       ` Patrick
2012-07-30 16:11       ` Georg Bauhaus
2012-07-30 22:06       ` Brian Drummond
2012-07-31  4:19         ` Randy Brukardt [this message]
2012-08-03 19:21           ` Yannick Duchêne (Hibou57)
2012-08-03 20:21             ` Brian Drummond
2012-08-04  2:48             ` Vasiliy Molostov
2012-07-30 16:07 ` Ludovic Brenta
2012-07-30 16:45   ` Dmitry A. Kazakov
2012-07-30 18:03     ` Patrick
2012-07-30 19:33       ` Dufr
2012-07-30 20:04         ` Patrick
2012-08-06  9:01         ` Jacob Sparre Andersen
2012-08-06  9:15         ` Pascal Obry
2012-08-01 23:57 ` Lucretia
2012-08-06 20:52 ` gautier_niouzes
replies disabled

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