-
Notifications
You must be signed in to change notification settings - Fork 423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lack of devirtualisation on Bindable<T>.Value #4995
Comments
I think there's quite a few scenarios we need to use |
The bindable interfaces are also troublesome, since every interface method access is a virtual call regardless of whether we devirtualise C# doesn't yet have interface devirtualisation:
Perhaps a |
I tried your benchmark on my machine with .NET 6, but also Dynamic PGO enabled:
According to the post Dynamic PGO can also cause regressions in some cases, but this is supposed to be fixed in .NET 7 |
Good to know. I believe in general we can turn on Dynamic PGO with .NET 6 already, did some rough benchmarks as such a while back. |
Since the project was upgraded to .NET 8.0, maybe revisiting this is a good idea |
Dynamic PGO is enabled by default in .NET 8. |
We are losing a considerable amount of performance due to
Bindable<T>.Value
beingvirtual
. MakingBindableInt
override + seal works however I'd rather push towards improving the bindable structure further instead since this sounds quite limiting.Current:
With a sealed override:
With referencing the field directly:
The text was updated successfully, but these errors were encountered: