Re: [Gimp-developer] gimp-plugin profiling

On 10 March 2013 22:55, Tibor Bamhor <tiborb95 gmail com> wrote:

Thank for you interest. Today I spent some time reading about perf - it is
quite complex tool or rather it measures things that I am not familiar with.
However I did some primitive testing and got this output:


I dont dare to interpret it, but the "201.49%" in last line was in red so
there is obviously a problem there. Here I would start.

If you (or anybody else) can point me at some source on internet I would be
thankfull. Or perhaps shortly explain how to mitigate the problem. But I
understand this is not gimp-specific issue...

Yes, if you have branches in inner loops eliminating them can give
large speedups.
A quick google search gave this reference which looks like an OK start:
Less branching may also allow the compiler to auto-vectorize more.
If you are unable to remove the branches in your inner loop, you can
try to guide the branch predictor using
GCCs __builtin_expect:

Note that not just if/case statements introduce branching,
do/while/for do as well.

Jon Nordby -

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]