-
-
Notifications
You must be signed in to change notification settings - Fork 989
IterationSetup is not running before each benchmark invocation #730
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
Comments
The problem: the default value of UnrollFactor is 16. It means that we call the target method 16 times in the loop body. We need this trick only for nanobenchmark (it prevents some microarch effects). Obviously, it doesn't make sense to use
|
I have an idea for solving this problem: Add new attribute: @stephentoub would |
In what scenario is the current behavior useful? It just seems buggy to me. |
@adamsitnik I don't think that we should introduce a new attribute. We just shouldn't use both |
@AndreyAkinshin I guess that is not enough just change UnrollFactor due to calculating invokeCount during pilot stage. |
I will solve this issue soon, it is causing too much confusion. When |
…re not, run benchmark once per iteration to avoid user confusion, fixes #730
…re not, run benchmark once per iteration to avoid user confusion, fixes dotnet#730
Repro using 0.10.14:
Example output from the main run:
This leads to very incorrect benchmark results when MyBenchmark is doing something that ends up caching data that can affect subsequent invocations of MyBenchmark. The whole purpose of IterationSetup in my case is to ensure that cache is cleared before the benchmark is executed.
The text was updated successfully, but these errors were encountered: