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

Ensuring unused code is run #887

Open
Etherian opened this issue Sep 19, 2020 · 1 comment
Open

Ensuring unused code is run #887

Etherian opened this issue Sep 19, 2020 · 1 comment

Comments

@Etherian
Copy link
Contributor

In a simple benchmarking script I'm writing I need to ensure the code being benched isn't optimized away. Any suggestions for how? Maybe something involving the IO monad?

@Marwes
Copy link
Member

Marwes commented Sep 20, 2020

I am not sure about the constraints here, but broadly speaking the only true way is to check that the benched code actually produces the expected value. Then you can be reasonably sure that the code actually runs.

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