|
|
Subscribe / Log in / New account

I think it's about some particular case of branch prediction...

I think it's about some particular case of branch prediction...

Posted May 25, 2011 6:10 UTC (Wed) by khim (subscriber, #9252)
In reply to: The problem with branch prediction by davecb
Parent article: The problem with prefetch

To fill the pipeline on contemporary CPU you need 30-50 instructions in flight. Without branch prediction it's just impossible to do. If you disable branch prediction on contemporary CPU the slowdown is crippling. Sadly only Intel engineers can give you numbers (because there are no way to disable it on retail CPU) - and they are not telling.


to post comments

I think it's about some particular case of branch prediction...

Posted May 25, 2011 10:58 UTC (Wed) by mingo (guest, #31122) [Link]

It's relatively easy to measure the cost of branch misses in certain cases, such as using 'perf stat --repeat N' (the branch miss rate will be measured by default) and a testcase that uses a pseudo-RNG so it can run the same workload random and non-random and comparing the two.

And yes, missing branches is crippling to performance: a 3% branch miss rate can cause a 5% total execution slowdown and a 20% percent miss rate can already double the runtime of a workload. (!)


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds