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

Benchmark (and potentially optimize) QueryInterface calls #35

Open
Boddlnagg opened this issue Feb 27, 2017 · 0 comments
Open

Benchmark (and potentially optimize) QueryInterface calls #35

Boddlnagg opened this issue Feb 27, 2017 · 0 comments

Comments

@Boddlnagg
Copy link
Collaborator

Repeated calls to QueryInterface with the same parameters are guaranteed to return the same thing. The modern C++ projection uses a new compiler optimization to annotate the function as being pure so the compiler can eliminate such (virtual) calls that would otherwise have a high runtime overhead.

It is also explained here: https://www.youtube.com/watch?v=lm4IwfiJ3EU#t=50m03s

Maybe we can find (or build) a way to have the Rust compiler do a similar thing.

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

1 participant