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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,16af87b269754773 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.germany.com!club-internet.fr!feedme-small.clubint.net!news.astraweb.com!border2.a.newsrouter.astraweb.com!eweka.nl!hq-usenetpeers.eweka.nl!69.16.177.246.MISMATCH!cyclone03.ams!news.ams.newshosting.com!npeersf01.ams!newsfet29.ams.POSTED!53ab2750!not-for-mail From: Chris Yocum User-Agent: Thunderbird 2.0.0.12 (X11/20080227) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Newbie Questions References: <47f24206$0$23703$9b4e6d93@newsspool2.arcor-online.net> In-Reply-To: <47f24206$0$23703$9b4e6d93@newsspool2.arcor-online.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: X-Complaints-To: abuse@virginmedia.com NNTP-Posting-Date: Tue, 01 Apr 2008 10:27:02 EDT Organization: virginmedia.com Date: Tue, 01 Apr 2008 15:27:02 +0100 Xref: g2news1.google.com comp.lang.ada:20722 Date: 2008-04-01T15:27:02+01:00 List-Id: Georg Bauhaus wrote: > Chris Yocum schrieb: >> Hi Everyone, >> I have been playing with GNAT and Ada for a little bit (GNAT 4.2.1 >> (Ubuntu 4.2.1-5ubuntu6) on Ubuntu 7.10). I have successfully written >> a doubly linked list with generics so I think I am starting to have a >> feel for the language. However, my binaries have always seemed a bit >> large compared to my C/C++ ones for similar data structures. I looked >> in the Wikibook FAQ about it and it instructed me to look at the >> various compiler options. > > The most important instruction should likely be to consider > how many bytes are important, really. For very small Ada > programs, the size of the run-time system might matter. I had considered this but the Wikibook says (http://en.wikibooks.org/wiki/Ada_Programming/Basic#FAQ:_Why_is_.22Hello.2C_world.21.22_so_big.3F) that this program should be on the order of 8K rather than the 21K that I am getting out of just a plain gnatmake. > > >> ~/adastuff/testhello$ gnat make -Phello.gpr >> gcc-4.2 -c -O3 -gnatn -funroll-loops > > Loop unrolling is not necessarily reducing code size, > if this is your goal? > >> -fPIC -fprofile-arcs > > Have you had a look at Chapter 9 of GCC 4.1, gcov? This > chapter should also have some info about the __gcov_* messages. Thanks for the info. I will look more closely at what you suggest. The unroll-loops was something that I copied out of Wikibook gpr file so I had not looked very closely at it. Thanks again. Chris