[PATCH xserver 1/3] xfree86/modes: Move gamma initialization to xf86RandR12Init12 v2

Keith Packard keithp at keithp.com
Thu Jul 28 17:11:19 UTC 2016


walter harms <wharms at bfs.de> writes:

> 1. I do not want to start an argument here.

Your comments are welcome and helpful.

> but i seems i need to explain what i wanted to say:
> "b and c do not change inside the loop"
>
> that does *not* mean I have to say: const double or so.

Right, the 'const' comment I made was purely about the attributes
advertised of the 'pow' function from glibc -- a function marked like
this:

double mypow(double a, double b) __attribute__ ((const));

does allow the compiler to pull the computation out of the
loop. However, glibc *doesn't* mark pow like this, so it isn't getting
optimized as expected.

> In my experience just moving that outside the loop give the
> compiler enought insight.

Yup, a patch that does that would be welcome.

-- 
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 810 bytes
Desc: not available
URL: <https://lists.x.org/archives/xorg-devel/attachments/20160728/166453cc/attachment.sig>


More information about the xorg-devel mailing list