[Mesa-dev] [RFC 10/21] mesa: Remove equality check in helper functions

Nanley Chery nanleychery at gmail.com
Fri Oct 23 10:45:49 PDT 2015

On Wed, Oct 21, 2015 at 11:43 PM, Erik Faye-Lund <kusmabite at gmail.com>

> On Tue, Oct 20, 2015 at 12:44 AM, Nanley Chery <nanleychery at gmail.com>
> wrote:
> > From: Nanley Chery <nanley.g.chery at intel.com>
> >
> > Since the version numbers being compared are integral and we don't ever
> > expect gl_context::Version to be equal to 0, subtract 1 from the rhs of
> > the equation and perform the optimization of removing the equality check.
> Is this really an improvement? Changing '>=' to '>' and then making
> all versions off-by-one seems like trading less readable and debugable
> code for no real upside...

After looking at the assembly generated, I've determined that this is
actually not an improvement. I'll drop this patch. I was using .text size
as my metric earlier. I now realize that it isn't completely reliable.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20151023/fba6f67f/attachment.html>

More information about the mesa-dev mailing list