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

Add block_box to benches #342

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add block_box to benches #342

wants to merge 1 commit into from

Conversation

a1phyr
Copy link
Contributor

@a1phyr a1phyr commented Sep 21, 2023

This makes iterate_* benches far more stable and less code layout dependent.

@Ralith
Copy link
Owner

Ralith commented Sep 22, 2023

I'm not sure this the right place for it. We want the compiler to be able to aggressively optimize the interior of the loop; if it can't, that means the iterator code is probably too complex and obscuring things. In the benchmarks we should only be concerned about work being deleted entirely, rather than just rearranged, and I haven't seen evidence that. If we did see that it could probably be handled with a single black_box application to the entire world after the loop.

Separately, maybe we should use the now stable and presumably more reliable std::hint version?

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

Successfully merging this pull request may close these issues.

2 participants