Prev: Elaboration query
Next: Dhrystone
From: Ada novice on 26 Jul 2010 13:18 On Jul 26, 5:48 pm, sjw <simon.j.wri...(a)mac.com> wrote: > > -gnatp to suppress checks. -gnatn is about inlining. Yes, sorry for the mix up. YC
From: Colin Paul Gloster on 27 Jul 2010 11:11 On Sat, 24 Jul 2010, Jonathan sent: |----------------------------------------------------------------------| |"[..] | | | | time ./bench | | | |Let's look at the best results first, and compare the | |'09 and '10 GNAT GPL compilers: | | | | 2010 GNAT GPL: | | gnatmake bench.adb -gnatnp -O2 -march=native -ffast-math -funroll- | |loops | | 3.61 seconds | | | | 2009 GNAT GPL: | | gnatmake bench.adb -gnatnp -O2 -march=native -ffast-math -funroll- | |loops | | 4.57 seconds | | | |This came as a nice surprise to me! | |We can learn some more about the compiler switches by | |toggling them. I'll stick to the 2010 GNAT GPL from now on: | | | | change -O2 to -O3: | | (gnatmake bench.adb -gnatnp -O3 -march=native -ffast-math -funroll-| |loops) | | running time changes from 3.61 to 3.63 seconds | | | | remove -funroll-loops: | | (gnatmake bench.adb -gnatnp -O2 -march=native -ffast-math) | | running time changes from 3.61 to 3.66 seconds | | | | remove -ffast-math: | | (gnatmake bench.adb -gnatnp -O2 -march=native) | | running time changes from 3.61 to 4.35 seconds | | | |The -ffast-math had an amazing affect. I've never seen that | |before ... maybe an interaction with complex number arithmetic. | | | |[..]" | |----------------------------------------------------------------------| The GNU Compiler Collection's -ffast-math switch used to provide a significant increase in speed for various frontends excluding GNAT. In my experience at least, this effect had no special relationship with complex numbers.
From: Ada novice on 1 Aug 2010 12:39
In this document: http://www.benchit.org/downloads/documents/comparing_gcc42_gcc43.pdf some guidelines are given for increased performance. Tow points worthy to note: 1. The -ftree-vectorize option is now on by default under -O3. 2. Tuning for Intel Core 2 processors is available via -mtune=core2 and -march=core2. Have anyone tried these options? YC |