comp.lang.ada
 help / color / mirror / Atom feed
From: sands@clipper.ens.fr (Duncan Sands)
Subject: Re: GNAT function calling overhead
Date: 1995/04/07
Date: 1995-04-07T00:00:00+00:00	[thread overview]
Message-ID: <3m3dad$bov@nef.ens.fr> (raw)
In-Reply-To: 1995Apr6.163740@di.epfl.ch

In article <1995Apr6.163740@di.epfl.ch>, Robb.Nebbe@di.epfl.ch (Robb Nebbe) writes:
|> In article <3m0nv1$pv2@nef.ens.fr>, Duncan Sands <sands@clipper.ens.fr> wrote:
|> >PS: The corresponding C code takes about 6 seconds.  This surprises
|> >me too.
|> 
|> 
|> The main reason is most likely that the Ada code is not at all equivalent
|> to the C code.
|> 
|> If you declare
|> 
|> type Matrix is array( 0 .. 14, 0 .. 14 ) of Float;
|> 
|> and write the loops in a way that allow the compiler to optimize out
|> the bounds checks (not sure if GNAT does this) then you should get
|> the same result as with C;

Thanks for your comments.  Actually I compiled with all checking
suppressed (range checking and others) for exactly this reason.
Therefore range checking is not the culprit.  I'm not too sure what
the culprit could possibly be.  In any case, the comparison I made
with C was quick and nasty so should be taken with a pinch of salt.

Duncan Sands.




  reply	other threads:[~1995-04-07  0:00 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-04-06  0:00 GNAT function calling overhead Duncan Sands
1995-04-06  0:00 ` Norman H. Cohen
1995-04-06  0:00 ` Colin James III
1995-04-06  0:00   ` Samuel Tardieu
1995-04-06  0:00   ` Robb Nebbe
1995-04-07  0:00     ` Duncan Sands [this message]
1995-04-07  0:00     ` Robert Dewar
1995-04-07  0:00   ` Robert Dewar
1995-04-07  0:00   ` Philip Brashear
1995-04-07  0:00   ` Tom Griest
1995-04-07  0:00     ` Robert Dewar
1995-04-07  0:00 ` Robert Dewar
1995-04-07  0:00 ` Theodore Dennison
1995-04-07  0:00   ` Robert Dewar
1995-04-07  0:00 ` Kenneth Almquist
1995-04-07  0:00   ` Larry Kilgallen
1995-04-07  0:00     ` Robert Dewar
1995-04-07  0:00   ` Robert Dewar
1995-04-07  0:00   ` Colin James III
1995-04-07  0:00     ` Robert Dewar
replies disabled

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