[Gegl-developer] more benchmarking: restrict vs no restrict

Nicolas Robidoux nrobidoux at cs.laurentian.ca
Sat Sep 13 09:43:26 PDT 2008


Hello:

I did some quick benchmarks, having to do with qualifying pointers local to gegl-sampler-yafr.c and gegl-sampler-linear.c with the restrict keyword.

The upshoot:

Speed wise, this makes not difference.

Comments:

These functions are fairly simple, so it could be that gcc can untangle aliasing, since there is not much opportunity for it.

When pointers are dealing with "stripes," separating them into different pointers may lead to more benefit when using the restrict keyword.

It could be that more globally defined pointers benefit more from the restrict keyword.

But I am starting to suspect that const has more likely impact on speed than restrict.

Nicolas Robidoux
Laurentian University/Universite Laurentienne


More information about the Gegl-developer mailing list