comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@cs.nyu.edu (Robert Dewar)
Subject: Re: Ada-95 for numerics?
Date: 1996/04/01
Date: 1996-04-01T00:00:00+00:00	[thread overview]
Message-ID: <dewar.828398857@schonberg> (raw)
In-Reply-To: 4jocek$h5h@rigel.rz.uni-ulm.de

"  c.) Is this a GNAT specific result or do the commercial compilers show the
      same behaviour?
  d.) Is there a way to speed up the program? Perhaps without suppressing all
      checks? (It seems somewhat brute to take away a lot of those things
      that are real advantages of Ada...)"

First, comparing GNAT with checks to C without checks is apples and
oranges, so undoubtedly a big part of the factor of 6 comes from
these checks (you can definitey minimize the checks by proper use
of subtypes etc, but right now GNAT does not do much to minimize
checks, there are lots of ways in which it could do a lot better).

Second, are you using unconstrained arrays? This again is a big
difference between C and the Ada code. 

You will find that if you turn off checks and use constrained arrays,
that you come much closer in speed. 

(GNAT does not handle unconstrained arrays very well on some
architectures, for a very simple reason that we understand well,
and intend to fix at some point).

Our priorities in GNAT development are first to get te functionality
complete and realiable, and second to optimize and improve the
quality of the code. There are a LOT of optimization opportunities,
which we wlil visit as GNAT development continues.

Actually I must say that numerical codes of this kind are not our
first priority. That's because relatively few GNAT users have
critical performance requirements in this area. 

By comparison, exception handling efficiency is a lot more important,
and 3.04 wlil feature VERY much improved performance in this area,
especially on Solaris and SunOS.

P.S. you might post the exact code you are using, that would enable 
answering your questions more precisely. The ratio of speed between
different languages can often be very dependent on coding details (in
any language). 





  parent reply	other threads:[~1996-04-01  0:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-04-01  0:00 Ada-95 for numerics? Joerg Rodemann
1996-04-01  0:00 ` Ted Dennison
1996-04-01  0:00   ` Robert Dewar
1996-04-01  0:00 ` Robert Dewar [this message]
1996-04-02  0:00   ` michael
1996-04-02  0:00 ` Dale Stanbrough
1996-04-03  0:00 ` Robert I. Eachus
  -- strict thread matches above, loose matches on Subject: below --
1996-04-02  0:00 Jean-Pierre Rosen
1996-04-03  0:00 ` Robert I. Eachus
1996-04-02  0:00 Joerg Rodemann
1996-04-02  0:00 ` Robert Dewar
1996-04-05  0:00  Dr J Parker
replies disabled

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