3 ms·
> On modern x86 processors, those instruction prefixes are simply ignored This sucks.
by amelius 1y ago
> On modern x86 processors, those instruction prefixes are simply ignored
This sucks.
- sparkie 1y agoThe branch taken hint (3EH) was re-added in Redwood Cove (2023), but it's only for static prediction where the branch predictor has not yet encountered the branch - ie, useful for things you would only use once or twice but would likely take the branch. Once the branch predictor has some information the static prediction hint is ignored, so it's best to omit it for anything that will eventually have dynamic branch prediction (ie, run many times), because you'll be consuming bytes in the i-cache which serve no purpose.
- tehjoker 1y agoif the branch is only taken once how can you realize a significant performance benefit more than a few ns?
- ack_complete 1y agoCold branch comes to mind -- something like a interrupt handler, that is run often enough but not in high enough bursts.