comp.lang.ada
 help / color / mirror / Atom feed
From: Ludovic Brenta <ludovic@ludovic-brenta.org>
Subject: Re: GNAT's stack checking in Ubuntu 9.04 (and Shootout regex-dna)
Date: Wed, 12 Aug 2009 02:32:17 -0700 (PDT)
Date: 2009-08-12T02:32:17-07:00	[thread overview]
Message-ID: <d0d7dc39-fa79-44f3-8096-8a2a67a5481a@b15g2000yqd.googlegroups.com> (raw)
In-Reply-To: 1aec6b98-6c73-43cf-a54f-0b0bc844aeee@w6g2000yqw.googlegroups.com

jonathan wrote on comp.lang.ada:
> Step 1.  Compile without the -a switch:
>
>   -O3 -gnatnp -funroll-all-loops -march=native regexdna.adb
>
>   Running time of ./regexdna: 63 seconds.
>
>   Comment: compilation near instanteous; I suppose it is
>   linking to precompiled  Gnat.Spitbol.Pattern  packages.
>
> Step 2.  Compile with the -a switch:
>
>   -O3 -a -gnatnp -funroll-all-loops -march=native regexdna.adb
>
>   Running time of ./regexdna: 51 seconds.
>
>   Comment: Compilation is slow. Looks like it is recompiling
>   the  Gnat.Spitbol.Pattern  packages.
>
>   So it looks like the performance problem I was complaining
>   about was due to the suboptimal precompiled Spitbol.Pattern.
>   In fact it was almost *entirely* due to the sub-optimal
>   Spitbol.Pattern, because running time is now close
>   to the running time I get from the GNAT GPL compilation.
>   (The GNAT GPL I downloaded was for 64-bit machines. I
>   would speculate that the precompiled Spitbol.Pattern
>   used by the Debian Lenny GNAT was for more general
>   architectures.)

If you use the amd64 port of Debian Lenny, your compiler is optimized
for 64-bit. However, I use the default options for the library. For
example, the i386 (actually i486) build daemon compiled g-spipat.adb
thus:

/build/buildd-gnat-4.3_4.3.2-1.1-i386-3dUv7K/gnat-4.3-4.3.2/build/./
gcc/xgcc -B/build/buildd-gnat-4.3_4.3.2-1.1-i386-3dUv7K/gnat-4.3-4.3.2/
build/./gcc/ -B/usr/i486-linux-gnu/bin/ -B/usr/i486-linux-gnu/lib/ -
isystem /usr/i486-linux-gnu/include -isystem /usr/i486-linux-gnu/sys-
include -c -g -O2      -W -Wall -gnatpg  g-spipat.adb -o g-spipat.o

If anyone is interested, I can try to compile with -O3 -funroll-all-
loops -gnatpg instead.

--
Ludovic Brenta (maintainer of gnat in Debian).



  reply	other threads:[~2009-08-12  9:32 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-03 22:54 GNAT's stack checking in Ubuntu 9.04 (and Shootout regex-dna) Georg Bauhaus
2009-08-03 22:56 ` Georg Bauhaus
2009-08-04  7:50   ` Ludovic Brenta
2009-08-04  9:17     ` Georg Bauhaus
2009-08-04  9:58       ` Vadim Godunko
2009-08-04 10:44         ` Georg Bauhaus
2009-08-04 12:30           ` Vadim Godunko
2009-08-04 14:15             ` Georg Bauhaus
2009-08-04 22:20         ` Egil
2009-08-04 15:38       ` Robert A Duff
2009-08-04 11:59 ` Brian Drummond
2009-08-04 14:18   ` Georg Bauhaus
2009-08-09 19:13   ` Georg Bauhaus
2009-08-10 13:10     ` jonathan
2009-08-10 20:12     ` jonathan
2009-08-10 20:29       ` Ludovic Brenta
2009-08-10 23:34       ` Georg Bauhaus
2009-08-11 20:02         ` jonathan
2009-08-11 21:19           ` jonathan
2009-08-11 21:38           ` Georg Bauhaus
2009-08-11  0:27       ` Georg Bauhaus
2009-08-11 19:05         ` jonathan
2009-08-12  9:32           ` Ludovic Brenta [this message]
2009-08-12 16:37             ` jonathan
replies disabled

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