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

Speeding up/documenting the gegl code

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.

3 of 4 messages available
Toggle history

Please log in to manage your subscriptions.

30087775.53551221309313400.... 07 Oct 20:29
  Speeding up/documenting the gegl code Nicolas Robidoux 13 Sep 14:41
   Speeding up/documenting the gegl code Sven Neumann 13 Sep 14:49
    Speeding up/documenting the gegl code Øyvind Kolås 13 Sep 15:06
Nicolas Robidoux
2008-09-13 14:41:50 UTC (about 16 years ago)

Speeding up/documenting the gegl code

(Forgive me for preaching, done from the vantage point of a very stubby soapbox.)

One thing which I would not mind seeing throughout the gegl code is the systematic use of the const keyword.

My understanding is that the const keyword can also be used effectively to indicate to the compiler that it can optimize without worrying about aliasing (of course, if the object is not const, the restrict keyword is the only weapon).

If is also good for documentation, because it allows one (me!) to find out easily which arguments can be changed by a function. (Akin to "classical" fortran subroutine documentation: declare the input arguments first, then the arguments which are both input and output, then those which are strictly output.

About const correctness:

http://www.cprogramming.com/tutorial/const_correctness.html

Sven Neumann
2008-09-13 14:49:42 UTC (about 16 years ago)

Speeding up/documenting the gegl code

Hi,

On Sat, 2008-09-13 at 08:41 -0400, Nicolas Robidoux wrote:

One thing which I would not mind seeing throughout the gegl code is the systematic use of the const keyword.

We will happily accept patches that introduce more constness. Pippin, do you agree?

Sven

Øyvind Kolås
2008-09-13 15:06:15 UTC (about 16 years ago)

Speeding up/documenting the gegl code

On Sat, Sep 13, 2008 at 1:49 PM, Sven Neumann wrote:

Hi,

On Sat, 2008-09-13 at 08:41 -0400, Nicolas Robidoux wrote:

One thing which I would not mind seeing throughout the gegl code is the systematic use of the const keyword.

We will happily accept patches that introduce more constness. Pippin, do you agree?

Yes, more usage of const is a good thing. I think most of the public API has const
arguments in the places where it should be, omissions there would be most important to get fixed. For the internals cleaning up the code will aid the future
refactoring and make development of new features like parallel processing easier.

/Øyvind K.