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

♻️ use different index SIMD dtype #11

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft

♻️ use different index SIMD dtype #11

wants to merge 9 commits into from

Conversation

jvdd
Copy link
Owner

@jvdd jvdd commented Dec 28, 2022

This PR handles the index as a different SIMD dtype (ideally unsigned int) in the inner SIMD loop.
=> this should result in fewer exits of this loop to the surrounding "overflow-safe" code.

First benchmarking results show that the added performance gain is neglectable..

  • rerun benchmarks on long arrays

If this also shows minor / no improvements, than I'd rather not merge this PR (as it is not worth the added complexity).

@jvdd jvdd added the enhancement New feature or request label Dec 28, 2022
Comment on lines -22 to -26
// https://stackoverflow.com/a/3793950
#[cfg(target_arch = "x86_64")]
const MAX_INDEX: usize = 1 << f64::MANTISSA_DIGITS;
#[cfg(target_arch = "x86")] // https://stackoverflow.com/a/29592369
const MAX_INDEX: usize = u32::MAX as usize;
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: double check this

@jvdd jvdd marked this pull request as draft January 18, 2023 09:33
@jvdd
Copy link
Owner Author

jvdd commented Jan 18, 2023

Changed this to draft as this is less a priority at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant