FAQ

On Fri, Aug 29, 2014 at 11:58:01PM -0700, Stephen Gutekanst wrote:
What is [a][the] branch predictor? I guess it predicts branching code and
does an optimization -- but how?
A branch predictor is part of your CPU and should be pretty good
nowadays. They mostly work by taking the history of a specific
conditional jump into account - was the branch taken or not?

You can imagine that for an oft-repeated loop this can lead to pretty
good results. As it might for your case where the taken branch will be
the same over the whole program execution.

Test it.

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 8 of 8 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedAug 25, '14 at 10:27p
activeAug 30, '14 at 11:39a
posts8
users5
websitegolang.org

People

Translate

site design / logo © 2022 Grokbase