Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Ada > Re: Newbie Ques...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 6 Topic 5633 of 5831
Post > Topic >>

Re: Newbie Questions

by Chris Yocum <cyocum@[EMAIL PROTECTED] > Apr 1, 2008 at 03:27 PM

Georg Bauhaus wrote:
> Chris Yo*** 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 im****tant instruction should likely be to consider
> how many bytes are im****tant, 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
 




 6 Posts in Topic:
Newbie Questions
Chris Yocum <cyocum@[E  2008-04-01 14:32:14 
Re: Newbie Questions
Georg Bauhaus <rm.tsoh  2008-04-01 16:09:10 
Re: Newbie Questions
Chris Yocum <cyocum@[E  2008-04-01 15:27:02 
Re: Newbie Questions
Robert A Duff <bobduff  2008-04-01 11:04:40 
Re: Newbie Questions
Chris Yocum <cyocum@[E  2008-04-01 16:08:43 
Re: Newbie Questions
Simon Wright <simon.j.  2008-04-01 22:16:36 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 1:20:23 CDT 2008.