Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: branch misprediction

Author: Francesco Di Tolla

Date: 00:18:57 07/15/04

Go up one level in this thread


>a) what are branch mispredictions?

Branch prediction is a teqnique used by modern CPU and essentially means sort of
guessing the next evolution of the code you're going to execute
(guessing/looking at next instructions) and sometimes even means executing
pieces of code in advance.
AMD are strong at that and have improoved with a better branch prediction while
Intel did pump-up the clock (except for the centrino).

The misprediction penalty is a drop in performance due to the fact you do a
wrong prediction.

>b) how do you minimize them?

You should not: unless you really want to code at assembler level, you should
let the compiler do the job.

The best thing to do is to compile with a specific option of optimization for
the target CPU.

Of course you need a compiler that knows the CPU you're coding for, otherwise it
will hardly be able to optimize for it.

regards
Franz



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.