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

C++ compilation for consts prevents optimizer from constant-folding #46

Open
tjhance opened this issue Sep 21, 2021 · 1 comment
Open

Comments

@tjhance
Copy link
Collaborator

tjhance commented Sep 21, 2021

The compiler has no way to know that the constants are really constant and has to look up the constant values each time they are used.

@parno
Copy link

parno commented Sep 27, 2021

Can you elaborate, e.g., with an example? Are you saying that the value of the constant is recomputed each time it's used?

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