comp.lang.ada
 help / color / mirror / Atom feed
From: Pascal Obry <pascal@obry.net>
To: tmoran@acm.org
Subject: Re: sub-optimal code for packed boolean arrays -- bug or inherent limitation
Date: Wed, 04 Jul 2007 21:16:44 +0200
Date: 2007-07-04T21:16:51+02:00	[thread overview]
Message-ID: <468BF21C.7040708@obry.net> (raw)
In-Reply-To: <Op6dnYeMZeYYexbbnZ2dnUVZ_gydnZ2d@comcast.com>

tmoran@acm.org a �crit :
> Using -O2 with the old gnat 3.15p on a 3GHz dual core Pentium (but only
> programming to use one core) under W2k, I find that the versions with
>         B(I) := not B(I);
> and
>         B(I) := B(I) xor True;
> take about 14 nanoseconds, while the version with
>         One(i) := True;
>         B   := B xor One;
> takes about 6.  With 1e9 calls, that's an 8 second difference.

That's not a proper timing. 3.15p is using a very old backend (2.x if my
memory is good). Since then there have been two major versions of the
GCC backend, both bringing better optimizations. It would be better to
do the measurement with GCC/FSF 4.2 or GNAT GPL 2007.

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|              http://www.obry.net
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595



  reply	other threads:[~2007-07-04 19:16 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-02 19:34 sub-optimal code for packed boolean arrays -- bug or inherent limitation Alinabi
2007-07-02 20:08 ` Ludovic Brenta
2007-07-03  1:01 ` Jeffrey R. Carter
2007-07-03  7:22   ` Harald Korneliussen
2007-07-03  8:37     ` Georg Bauhaus
2007-07-03  7:59 ` gautier_niouzes
2007-07-03  9:25 ` Stefan Lucks
2007-07-03 12:40   ` Stefan Lucks
2007-07-03 15:42 ` Adam Beneschan
2007-07-03 18:04 ` Alinabi
2007-07-03 18:09   ` Alinabi
2007-07-03 18:17     ` Alinabi
2007-07-10  2:06       ` Randy Brukardt
2007-07-03 18:36   ` Jeffrey R. Carter
2007-07-03 19:42     ` Alinabi
2007-07-04  1:12       ` Jeffrey R. Carter
2007-07-04 10:15         ` Jeffrey Creem
2007-07-04 18:28           ` Jeffrey R. Carter
2007-07-04  3:22       ` Steve
2007-07-04  6:31         ` Harald Korneliussen
2007-07-08 22:53     ` Robert A Duff
2007-07-09  6:09       ` tmoran
2007-07-04  9:00   ` Jean-Pierre Rosen
2007-07-04 18:27     ` tmoran
2007-07-04 19:16       ` Pascal Obry [this message]
2007-07-05  1:45         ` tmoran
2007-07-05  4:53       ` Jeffrey R. Carter
2007-07-04 18:51     ` tmoran
2007-07-08 22:58 ` Robert A Duff
replies disabled

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