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

Searching was optimized out #2

Closed
xjossy opened this issue Oct 15, 2020 · 1 comment
Closed

Searching was optimized out #2

xjossy opened this issue Oct 15, 2020 · 1 comment

Comments

@xjossy
Copy link

xjossy commented Oct 15, 2020

Searching can be optimized out. For example, VS compiler does this.
Probably, you should do bm::DoNotOptimize that way:

enumerate_matches(buffer_span, needles[state.iterations() % needles.size()], engine, [](size_t s) {
       bm::DoNotOptimize(s);
});
@ashvardanian
Copy link
Owner

Thanks, done: 1cd4d82

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