• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.
  • The forums have been upgraded with support for dark mode. By default it will follow the setting on your system/browser. You may override it by scrolling to the end of the page and clicking the gears icon.

AMD Works with Microsoft to Improve Zen 3 thru Zen 5 Performance in Windows 11 24H2

From a technical standpoint: why would branch prediction be different for root and users?

I am asking both "how" and "why".
 
I've tried a few benches under WinPE & the difference is there, even for AIDA64, roughly in the same ballpark of at least 2-5% over regular admin account. I haven't checked default admin in a long time but it could have something to do with default "Exploit protection" settings under Windows which includes DEP, CFG, SEHOP, ASLR et al.

Teaser
 
Optional Windows 11 23H2's KB5041587 has a similar uplift.
 
From a technical standpoint: why would branch prediction be different for root and users?

I am asking both "how" and "why".
They not, the gains on the admin account have been misinterpreted, I think @Solaris17 mentioned this in a recent post, and his comment wasnt a mile off a suggestion I made as well. This is also why when HUB tested the Windows build his results were different to when he tested the admin account.
 
They not, the gains on the admin account have been misinterpreted, I think @Solaris17 mentioned this in a recent post, and his comment wasnt a mile off a suggestion I made as well. This is also why when HUB tested the Windows build his results were different to when he tested the admin account.

It also just happens to be something that is repeated in a news post we recently posted. You can see they dont directly say they are the same but they dont clarify the statement given by AMD.

This is not related to the recent announcement, but anyone interested can see how branch predictors are not only primarily silicon tools, they only operate at the kernel level (outside of user space)


That is a short document going over a different issue from another time Zen 3 I think but the branch predictors are similar even today. Its pretty dry, but you can just skim it to get the idea pretty quickly.
 
From a technical standpoint: why would branch prediction be different for root and users?

I am asking both "how" and "why".
There's a more fundamental question to be asked: how is it possible to write code that undermines (to an extent) the operation of branch predictors?

I'm not saying there aren't valid explanations for that, maybe related to security. But it's unclear. Modern hardware is designed to chew through many kinds of unoptimised code with great performance. That's in part because history (Itanium is history) has shown that compile-time optimisations aren't very effective because you can't predict which CPU resources will be available at runtime.

This is not related to the recent announcement, but anyone interested can see how branch predictors are not only primarily silicon tools, they only operate at the kernel level (outside of user space)

https://www.amd.com/system/files/do...ance-for-mitigating-branch-type-confusion.pdf
Thanks, although this goes over my head (by far). So kernel code can clear branch prediction buffers, with a surprisingly high penalty? Could that reduce the performance with normal user accounts more than with admin accounts? Because of more frequent context switching?
 
There's a more fundamental question to be asked: how is it possible to write code that undermines (to an extent) the operation of branch predictors?

I'm not saying there aren't valid explanations for that, maybe related to security.
Spectre mitigation?

That's the only speculation I've heard, and I have no problem believing it for now.

It can probably be checked by running some benches with an older Windows version, non-updated of course. I dunno if there's any point in doing that, as those updates did affect performance.
 
Last edited:
You're losing the point here.
It runs faster on 24H2 because they patched it, not because anything else.
Will they patch W10 scheduler? Probably not. That's the point.

This has been known for years and they decided to work on this after release, knowing older zen will benefit as well.
 
Back
Top