From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,b49d3a703a4b4db5 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!feeder.news-service.com!85.214.198.2.MISMATCH!eternal-september.org!.POSTED!not-for-mail From: Colin Paul Gloster Newsgroups: comp.lang.ada Subject: Re: compiler settings in AdaGIDE Date: Tue, 27 Jul 2010 16:11:12 +0100 Organization: A noiseless patient Spider Message-ID: References: Reply-To: Colin Paul Gloster Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Injection-Date: Tue, 27 Jul 2010 15:11:24 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="kheEuXGHhE2Z5eF1gAST+A"; logging-data="9717"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+FjRIJxTTPwAay1Hw7gWhvqQ3ab6AP/9gVZ7xmdpelkQ==" User-Agent: Alpine 2.00 (LRH 1167 2008-08-23) In-Reply-To: Cancel-Lock: sha1:2uG80KacehY99DeWEh/yBYRml00= X-X-Sender: Colin_Paul@64bit-RedHat-Enterprise-Linux6beta Xref: g2news1.google.com comp.lang.ada:12607 Date: 2010-07-27T16:11:12+01:00 List-Id: 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.