From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: GNAT (GCC) Profile Guided Compilation
Date: Fri, 29 Jun 2012 14:05:59 +0200
Date: 2012-06-29T14:05:59+02:00 [thread overview]
Message-ID: <fe8h64khsd9z.zu0wauvawrua$.dlg@40tude.net> (raw)
In-Reply-To: 62d099a8-d754-4c13-b8c8-d8eea2d6a764@googlegroups.com
On Fri, 29 Jun 2012 03:01:30 -0700 (PDT), Keean Schupke wrote:
> On Friday, 29 June 2012 10:34:19 UTC+1, Dmitry A. Kazakov wrote:
>> On Fri, 29 Jun 2012 02:17:19 -0700 (PDT), Keean Schupke wrote:
>>
>>> Anyone have any ideas why profile guided compilation performs so poorly
>>> with Ada compared to C++?
>>
>> Probably because you programmed it using low level C-ish stuff like
>> addresses instead of accessing data directly. In general, if you write a C
>> program in Ada (or any other language), you cannot expect it do better than
>> in C. To beat C, the precondition is to design it in Ada way.
> In general I find the choice of algorithm dominates performance. In this
> case most of the performance is dominated by a disjoint-set (union-find)
> algorithm operating on an array of data. The data nominally represents a
> 2D space (although I am using a 1D array to avoid the cost of
> multiplication on every access).
That still does not justify machine addresses or pointers to limited
targets.
I would not be so sure that access to 2D array is slower when done by the
compiler. That depends on too many factors.
I also do not know what effect has profiling on inlining and optimizations
of generic instances in presence of numerous very short subprograms. I
guess that should severely distort the picture, maybe beyond recognition. I
must admit it, I never used gcc profiling any seriously, instead, I always
did direct time measures.
If performance is OK without profiling, why do you care?
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
next prev parent reply other threads:[~2012-06-29 12:05 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-29 9:17 GNAT (GCC) Profile Guided Compilation Keean Schupke
2012-06-29 9:34 ` Dmitry A. Kazakov
2012-06-29 10:01 ` Keean Schupke
2012-06-29 10:24 ` Keean Schupke
2012-06-29 12:26 ` stefan-lucks
2012-06-29 12:51 ` Keean Schupke
2012-06-29 12:05 ` Dmitry A. Kazakov [this message]
2012-06-29 10:48 ` Simon Wright
2012-06-29 11:14 ` Keean Schupke
2012-06-29 12:39 ` gautier_niouzes
2012-06-29 12:52 ` Keean Schupke
2012-06-29 14:14 ` gautier_niouzes
2012-06-29 15:05 ` gautier_niouzes
2012-06-29 17:03 ` Keean Schupke
2012-07-01 9:29 ` Georg Bauhaus
2012-07-01 17:45 ` Georg Bauhaus
2012-07-01 22:57 ` Keean Schupke
2012-07-02 17:15 ` Georg Bauhaus
2012-07-02 17:26 ` Keean Schupke
2012-07-02 23:48 ` Keean Schupke
2012-07-04 10:38 ` Georg Bauhaus
2012-07-04 10:57 ` Keean Schupke
2012-07-04 12:36 ` Mark Lorenzen
2012-07-04 12:38 ` Georg Bauhaus
2012-07-14 20:17 ` Keean Schupke
2012-07-14 20:33 ` Keean Schupke
2012-07-14 20:43 ` Niklas Holsti
2012-07-14 22:32 ` Keean Schupke
2012-07-14 23:40 ` Keean Schupke
2012-07-15 7:15 ` Niklas Holsti
2012-07-15 8:27 ` Keean Schupke
2012-07-18 10:01 ` Georg Bauhaus
2012-07-18 17:36 ` Keean Schupke
2012-07-19 5:42 ` Georg Bauhaus
2012-07-19 10:18 ` Keean Schupke
2012-07-15 11:02 ` Niklas Holsti
2012-07-15 12:48 ` Keean Schupke
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox