Re: [Gimp-developer] gimp-plugin profiling

Well, I have a lot of if/then in code, but they are essential. So probably no opportunity here.

I will look on the links you provided anyway, thanks...

2013/3/11 Jon Nordby <jononor gmail com>

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]