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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!gegeweb.org!news.ecp.fr!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Size of linked program increasing with new version of GNAT. Date: Mon, 29 Dec 2014 17:56:42 -0600 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <7f38a07d-3f73-432c-8647-e3a7dcf43637@googlegroups.com> NNTP-Posting-Host: rrsoftware.com X-Trace: loke.gir.dk 1419897402 1708 24.196.82.226 (29 Dec 2014 23:56:42 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Mon, 29 Dec 2014 23:56:42 +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 Xref: news.eternal-september.org comp.lang.ada:24280 Date: 2014-12-29T17:56:42-06:00 List-Id: "Tony" wrote in message news:db4a0ed9-d5e8-40ea-8def-0683c98584fb@googlegroups.com... > On Saturday, December 27, 2014 7:43:14 AM UTC+1, Simon Wright wrote: >> A main program with a null body, compiled with -O2 and stripped, >> resulted in executable size 83540; > > I'd expect that program to be compiled into a single machine code return > instruction. > > I managed to create a 12 KB version of Hello-World, by excluding runtime > and >Ada.Text_Io and calling Win32 functions directly: So what? (1) I created a 56KB executable by using Janus/Ada on a simple Hello world program using Text_IO. (Options: /zt/f). (2) I could shrink that further to 38K by using RRText_IO instead of Text_IO. (Text_IO has lots of overhead from maintaining line and column counts that are almost never used; RRText_IO originated in our early CP/M compilers [the ones that had to run in 48K RAM - code and data] and is simpler but still has most of the useful capabilities.) (3) But still, who cares? Im my experience with a variety of Ada compilers, there's no correlation between the minimum size of a program and the size of real programs. And programs that don't use at least some of exceptions, controlled types, tasks, floating point, images, and other expensive operations are hardly using Ada at all. The size of Hello world tells one very little about the size and efficiency of a real program. Randy.