comp.lang.ada
 help / color / mirror / Atom feed
From: Robb.Nebbe@di.epfl.ch (Robb Nebbe)
Subject: Re: GNAT function calling overhead
Date: 1995/04/06
Date: 1995-04-06T00:00:00+00:00	[thread overview]
Message-ID: <1995Apr6.163740@di.epfl.ch> (raw)
In-Reply-To: 3m0psq$fl2@stout.entertain.com

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;


Robb Nebbe




  parent reply	other threads:[~1995-04-06  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 ` Colin James III
1995-04-06  0:00   ` Samuel Tardieu
1995-04-06  0:00   ` Robb Nebbe [this message]
1995-04-07  0:00     ` Robert Dewar
1995-04-07  0:00     ` Duncan Sands
1995-04-07  0:00   ` Philip Brashear
1995-04-07  0:00   ` Robert Dewar
1995-04-07  0:00   ` Tom Griest
1995-04-07  0:00     ` Robert Dewar
1995-04-06  0:00 ` Norman H. Cohen
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