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