From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,4d3e59455e947c5e X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.180.100.98 with SMTP id ex2mr1557424wib.4.1344321824269; Mon, 06 Aug 2012 23:43:44 -0700 (PDT) MIME-Version: 1.0 Path: q11ni5727946wiw.1!nntp.google.com!feed-C.news.volia.net!volia.net!news2.volia.net!feed-A.news.volia.net!border1.nntp.ams2.giganews.com!border2.nntp.ams2.giganews.com!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!border2.nntp.dca.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!ctu-peer!ctu-gate!news.nctu.edu.tw!usenet.stanford.edu!newsfeed.news.ucla.edu!news.snarked.org!nntp.develooper.com!news.jacob-sparre.dk!munin.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Suitability of Ada as a general-purpose language Date: Mon, 30 Jul 2012 23:19:58 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1343708401 30466 69.95.181.76 (31 Jul 2012 04:20:01 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Tue, 31 Jul 2012 04:20:01 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Date: 2012-07-30T23:19:58-05:00 List-Id: "Brian Drummond" 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.