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

Simplify random access iterator advancement #899

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

stephenswat
Copy link
Member

@stephenswat stephenswat commented Dec 8, 2024

I was surprised while profiling the detray code to find that a surprisingly large amount of time is spent in the random access iterator advance function. This is somewhat inefficiently implemented as it is full of if statements. I have decided to simplify the function, which leads to a small but noticeable performance improvement of around 4% in the detray benchmarks.

@stephenswat
Copy link
Member Author

Also fixes a minor error in a nearby comment.

I was surprised while profiling the detray code but a surprisingly large
amount of time is spent in the random access iterator advance function.
This is somewhat inefficiently implemented as it is full of if
statements. I have decided to simplify the function, which leads to a
small but noticeable performance improvement of around 4% in the detray
benchmarks.
Copy link

sonarqubecloud bot commented Dec 9, 2024

@stephenswat stephenswat merged commit cefce90 into main Dec 9, 2024
29 of 31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants