comp.lang.ada
 help / color / mirror / Atom feed
From: Keean Schupke <keean.schupke@googlemail.com>
Subject: Re: GNAT (GCC) Profile Guided Compilation
Date: Sun, 15 Jul 2012 05:48:39 -0700 (PDT)
Date: 2012-07-15T05:48:39-07:00	[thread overview]
Message-ID: <46d9d433-2bff-410d-ab0e-88fd5a5c0e72@googlegroups.com> (raw)
In-Reply-To: <a6fma7Fm6hU1@mid.individual.net>

On Sunday, 15 July 2012 12:02:31 UTC+1, Niklas Holsti  wrote:
> On 12-07-15 10:15 , Niklas Holsti wrote:
> 
> &gt; It seems to me that the general belief, regarding the expected relative
> &gt; speeds of the short-circuit code versus the long-circuit code for
> &gt; Boolean expressions with simple operands, is that the branch penalties
> &gt; on modern processors are so large that the short-circuit form is not
> &gt; obviously faster. This may explain why the Ada compiler is not using the
> &gt; short-circuit code automatically.
> &gt;
> &gt; Clearly, if the expression is &quot;(simple operand likely to be True) and
> 
> Oops, my brain fart: change that to &quot;likely to be False&quot;.
> 
> &gt; (longer and longer expression)&quot;, at some point the short-circuit code
> &gt; (or changing to &quot;and then&quot;) will become faster than the long-circuit
> &gt; code, whatever the branch penalty. This point will come sooner if
> &gt; profile-guidance is used to reduce the branch penalty.
> 
> -- 
> Niklas Holsti
> Tidorum Ltd
> niklas holsti tidorum fi
>        .      @       .

Surely True for "or else" (as soon as one argument is true the other need not be evaluated)and false for "and then" (as soon as one argument is false the other need not be evaluated).

Cheers,
Keean.



      reply	other threads:[~2012-07-15 12:48 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
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 [this message]
replies disabled

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