comp.lang.ada
 help / color / mirror / Atom feed
From: gdm@popremove.mydiax.ch (Gautier de Montmollin)
Subject: Re: Re: Numerical Computation and Ada95
Date: Sun, 13 May 2001 21:42:48 +0000 (UTC)
Date: 2001-05-13T21:42:48+00:00	[thread overview]
Message-ID: <3AFF0005.F1F0ECDD@pop.mydiax.ch> (raw)
In-Reply-To: 9deus2$8t6$1@ulysses.noc.ntua.gr

> Hi all,
> First of all I would like to thank everyone for his/her help. From what you
> said I understand that it is pointless to compare languages in their timing
> efficiency.

In contrary, it is interesting to compare - of course you compare rather
the *compilers*...

The good surprise is that you can e.g. make a *generic* sparse matrix package 
whose instanciations run as fast as their Fortran 77 equivalents for various
precisions. 
I did compare on an Alpha server under OpenVMS, with Ada & F77 compilers from Compaq.
It required a bit of tuning before reaching the original, of course, since
I coded the sparse matrix type as an unconstrained record with arrays in it,
a thing a bit more "clothed" than the arrays passed the in F77 code.

I needed to use that code in a project programmed in Ada, so the question was either
to interface to the F77 code or to make an Ada version.
In global programmation time it was also a big benefit since I could use later the same
code with GNAT on e.g. PC platforms. If you use the correct switches, like
-O2, -gnatpn, -funroll-loops (GNAT), you obtain a very nice performance.
Things like ":=", "others=>" with big objects are poorly coded
by some Ada compilers, but otherwise the job is very well done; abstraction
often helps performance.

In addition, in the debugging phase, you compile with the checks ON and you find
lots of bugs about array bounds. This is also an absolute plus!
BTW, interesting to mention that translations from Fortran very often show latent
or undetected bugs like 0 index reached in an array meant to be on 1..N, etc.

__________________________________________
Gautier  --  http://www.diax.ch/users/gdm/

-- 
Posted from duba05h05-0.dplanet.ch [212.35.36.52] 
via Mailgate.ORG Server - http://www.Mailgate.ORG



  parent reply	other threads:[~2001-05-13 21:42 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-09 19:13 Numerical Computation and Ada95 N&J
2001-05-09 19:42 ` David Starner
2001-05-10 12:23   ` Pat Rogers
2001-05-10 13:51   ` Ted Dennison
2001-05-10 18:21   ` Jeffrey Carter
2001-05-09 19:43 ` Ted Dennison
2001-05-09 21:57 ` James Rogers
2001-05-10  0:41 ` Dr Adrian Wrigley
2001-05-10  5:45   ` N&J
2001-05-10  6:37     ` David Starner
2001-05-10  6:48     ` tmoran
2001-05-10 20:12       ` Gary Scott
2001-05-10 14:04     ` Ted Dennison
2001-05-11 14:15       ` Marin David Condic
2001-05-10 20:08     ` Gary Scott
2001-05-11 11:58       ` Larry Kilgallen
2001-05-11 11:31         ` Dan Nagle
2001-05-11 14:33         ` Gary Scott
2001-05-11  4:00     ` Lao Xiao Hai
2001-05-11 14:03     ` Marin David Condic
2001-05-10  8:00 ` Martin Dowie
2001-05-10 14:11   ` Ted Dennison
2001-05-10 15:46     ` Martin Dowie
2001-05-10 13:54 ` Martin Stift
2001-05-11  5:59   ` mike
2001-05-10 19:07 ` Laurent Guerby
2001-05-10 20:49 ` N&J
2001-05-11 16:28   ` Jean-Pierre Rosen
2001-05-11 18:28     ` Marin David Condic
2001-05-13 21:42   ` Gautier de Montmollin [this message]
2001-05-11  2:02 ` DuckE
replies disabled

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