# Branch predictor: How many "if"s are too many? Including x86 and M1 benchmarks!

DevFeed: [Branch predictor: How many "if"s are too many? Including x86 and M1 benchmarks!](<https://devfeed.tech/articles/branch-predictor-how-many-if-s-are-too-many-including-x86-and-m1-benchmarks-38995.md>)

Original publisher: [Read original article](<https://idea.popcount.org/2021-05-06-branch-predictor-how-many-ifs-are-too-many-including-x86-and-m1-benchmarks>)

Author: Marek

Published: 2021-05-05T22:00:00Z

Content type: article

Language: en

Sources: [Marek Majkowski](<https://devfeed.tech/sources/marek-majkowski.md>)

Topics: [x86](<https://devfeed.tech/topics/x86.md>), [Cloudflare](<https://devfeed.tech/topics/cloudflare.md>)

Tags: [architecture](<https://devfeed.tech/tags/architecture.md>), [article](<https://devfeed.tech/tags/article.md>), [benchmarks](<https://devfeed.tech/tags/benchmarks.md>), [blog](<https://devfeed.tech/tags/blog.md>), [cloudflare](<https://devfeed.tech/tags/cloudflare.md>), [discussion](<https://devfeed.tech/tags/discussion.md>), [hacker-news](<https://devfeed.tech/tags/hacker-news.md>), [travis](<https://devfeed.tech/tags/travis.md>), [x86](<https://devfeed.tech/tags/x86.md>)

## AI overview

The article examines how many conditional branches affect branch prediction, with benchmarks covering x86 and M1 systems. It also points to discussions about BTB behavior, M1 branch-predictor interactions with the iCache prefetcher, and related commentary.

## Source excerpt

Branch predictor: How many "if"s are too many? Including x86 and M1 benchmarks! I published an article on Cloudflare blog: Notable discussions mentioning this work: - Looking at BTB behavior and size: a comment on my work from Travis Downs, followed by response from Linus Torvalds. - Discussion on M1 architecture, with fascinating take on branch predictor interactions with iCache prefetcher. - Hacker News commentary