comp.lang.ada
 help / color / mirror / Atom feed
From: Reinert Korsnes <reinert.korsnes@chello.no>
Subject: Re: comparing gnat/Ada95 and g77
Date: Fri, 15 Mar 2002 11:44:10 +0100
Date: 2002-03-15T11:44:10+01:00	[thread overview]
Message-ID: <a6sjb3$em8$1@snipp.uninett.no> (raw)
In-Reply-To: 3c907c86.6094213@news.demon.co.uk

Thanks all for response.

For the Ada95 program I used:

 gnatmake test1.adb -cargs -O3 -ffast-math 

and for the Fortran version I used:

  f77 -c -O3 -ffast-math test1.f (and f77 -o test1 test1.o)

Ada:    11.8 s

Fortran: 2.7 s

Maybe "-ffast-math" is silently ignored (not "legal") for gnat 
since it is "dirty" ?  Without "-ffast-math" the Fortran 
version takes about 10.3 s .

reinert

PS: yes, I did NOT try to make a program doing anything
    meaningful except for figuring out compile options. 



John McCabe wrote:

> On Thu, 14 Mar 2002 10:47:18 +0100, Reinert Korsnes
> <reinert.korsnes@chello.no> wrote:
> 
>>Hi,
>>
>>Could anybody try these two programs (Ada and Fortran)
>>and see if it is possible to make the Ada version (via compile
>>options) to run as fast as the Fortran version under Linux, gnat
>>and g77 ?
> 
> What do you mean by "as fast as"? Do you have some figures already?
> What are the differences?
> 
> I can't see any reason (other than constraint checking which can be
> switched off) why the actual calculations should be any different, but
> you might find that the IO takes longer in Ada than in Fortran because
> it is obviously a bit more complicated (3 subroutine calls instead of
> 1) and, as you're doing this within a *huge* loop, any slight
> degradation here will be significant.




  parent reply	other threads:[~2002-03-15 10:44 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-14  9:47 comparing gnat/Ada95 and g77 Reinert Korsnes
2002-03-14 10:37 ` John McCabe
2002-03-14 11:00   ` Preben Randhol
2002-03-15 10:44   ` Reinert Korsnes [this message]
2002-03-15 12:14     ` John McCabe
2002-03-15 17:53       ` Georg Bauhaus
2002-03-16 14:00     ` Gautier
2002-03-14 10:58 ` Martin Dowie
2002-03-14 11:04   ` chris.danx
2002-03-14 11:07     ` Bobby D. Bryant
2002-03-14 11:41     ` David C. Hoos, Sr.
2002-03-14 11:06   ` Preben Randhol
2002-03-14 16:43     ` Jeffrey Carter
2002-03-14 11:14 ` Gerald Kasner
2002-03-14 12:59   ` Gary Scott
2002-03-14 13:17     ` Jean-Marc Bourguet
2002-03-15  0:52       ` Gary Scott
2002-03-14 16:19     ` Dan Andreatta
2002-03-15  9:35       ` Gerald Kasner
2002-03-14 17:31   ` Toshitaka Kumano
2002-03-14 16:40 ` Jeffrey Carter
replies disabled

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