Re: KHTML-Measurement (from my talk at aKademy)

Arend Bayer <[email protected]>
Newsgroups gmane.comp.kde.devel.optimize
Message-ID <[email protected]>

> There's a way to help branch prediction without writing assembly code though...
> See KDE_ISLIKELY and KDE_ISUNLIKELY in kdemacros.h (they use __builtin_expect from gcc)
> 

Quote from the gcc info pages:
     In general, you should prefer to use
     actual profile feedback for this (`-fprofile-arcs'), as
     programmers are notoriously bad at predicting how their programs
     actually perform.

I found this to be quite true in my own experiments in my own (very
performance sensitive) project. Note that you have to better then the
CPU branch prediction, which seems usually very good.

It's something which might be worth doing once you worry about squeezing
out the latest percent of performance.

Arend
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.