Re: gimp-plugin profiling

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

 



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@xxxxxxxxx>

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:
http://software.intel.com/en-us/articles/avoiding-the-cost-of-branch-misprediction
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: http://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html

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

--
Jon Nordby - www.jonnor.com

_______________________________________________
gimp-developer-list mailing list
gimp-developer-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gimp-developer-list

[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux