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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,103803355c3db607,start X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.204.154.76 with SMTP id n12mr124300bkw.1.1340961530309; Fri, 29 Jun 2012 02:18:50 -0700 (PDT) Path: y28ni1809bky.0!nntp.google.com!news2.google.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Keean Schupke Newsgroups: comp.lang.ada Subject: GNAT (GCC) Profile Guided Compilation Date: Fri, 29 Jun 2012 02:17:19 -0700 (PDT) Organization: http://groups.google.com Message-ID: NNTP-Posting-Host: 82.44.19.199 Mime-Version: 1.0 X-Trace: posting.google.com 1340961530 22115 127.0.0.1 (29 Jun 2012 09:18:50 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 29 Jun 2012 09:18:50 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=82.44.19.199; posting-account=T5Z2vAoAAAB8ExE3yV3f56dVATtEMNcM User-Agent: G2/1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2012-06-29T02:17:19-07:00 List-Id: I am developing a Monte-Carlo simulation engine, and I have implementations= in C++ and Ada. All performance figures come from the same reference hardw= are. Both are built using GCC, and similar optimisation is applied to each = (same optimisation level, cpu arch, inlining etc). My C++ implementation achieves 40,000 simulations per second. My Ada port initially achieves 32,000 iterations per second. I refactored the Ada port to use System.Address to access the main data str= ucture (as in the 'C++' version benchmarking showed a clear performance ben= efit to *ptr_x compared to array[x]) The Ada port using System.Address achieves 40,000 simulations per second - = so this is looking good. However, when I use profile guided compilation, the C++ code performance le= aps to 56,000 simulations per second, whereas the Ada only achieves 44,000 = simulations per second. Anyone have any ideas why profile guided compilation performs so poorly wit= h Ada compared to C++? The initial with normal compilation seemed very prom= ising. Cheers, Keean.