Skip to content
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

what kind of optimizations can it do? #3

Open
cztomsik opened this issue Apr 2, 2019 · 1 comment
Open

what kind of optimizations can it do? #3

cztomsik opened this issue Apr 2, 2019 · 1 comment

Comments

@cztomsik
Copy link

cztomsik commented Apr 2, 2019

I'm curious if it can for example reduce vtable cost?

I want to write my code using dyn traits even if there is only one implementation used actually (alternate impl for tests) but I also don't want to do too much generics (which could avoid vtables but it's a way more typing and it's not possible to use it for everything)

@wbrickner
Copy link

LLVM's PGO is what is relied on here, and it should be unable to reduce the dynamic dispatch overhead.

My understanding is that PGO is able to reorder / change the structure of branches to cooperate better with the branch predictor and (maybe) change some memory layout details, both based on recorded access / branch patterns. I don't think it can do much else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants