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

new bench that tests random command ordering, to confuse the branch predictor #12

Merged
merged 2 commits into from
Jun 18, 2023

Conversation

fabi321
Copy link
Contributor

@fabi321 fabi321 commented Jun 18, 2023

The current implementation takes a significant hit from a random load, as it turns out that the branch predictor is pretty good at predicting predictable stuff.

(11ms vs 19ms on my machine)

@sbernauer
Copy link
Owner

Related: #4
Thanks a lot!

@sbernauer sbernauer merged commit a0d86d0 into sbernauer:master Jun 18, 2023
7 checks passed
@sbernauer
Copy link
Owner

Just for the record:

parse_draw_commands_ordered/1920 x 1080
                        time:   [25.405 ms 25.929 ms 26.617 ms]
Found 3 outliers among 100 measurements (3.00%)
  3 (3.00%) high severe

parse_draw_commands_shuffled/1920 x 1080
                        time:   [32.665 ms 32.684 ms 32.705 ms]
Found 4 outliers among 100 measurements (4.00%)
  1 (1.00%) high mild
  3 (3.00%) high severe

@fabi321 fabi321 deleted the bench-improvement branch June 18, 2023 20:43
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.

None yet

2 participants