RSS/Atom feed Twitter
Site is read-only, email is disabled

more benchmarking: restrict vs no restrict

This discussion is connected to the gegl-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

1 of 2 messages available
Toggle history

Please log in to manage your subscriptions.

30498968.54261221321242459.... 07 Oct 20:29
  more benchmarking: restrict vs no restrict Nicolas Robidoux 13 Sep 18:43
Nicolas Robidoux
2008-09-13 18:43:26 UTC (over 16 years ago)

more benchmarking: restrict vs no restrict

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