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

Stop col_norm early for < max hamming distance #154

Merged
merged 3 commits into from
Mar 24, 2023
Merged

Conversation

nonhermitian
Copy link
Collaborator

@nonhermitian nonhermitian commented Mar 24, 2023

When doing large numbers of bit-strings, e.g. 100k or more, the column norm calculation can take a while. This can be minimized by doing the computation in parallel using the OPENMP capabilities in M3. However, there is some additional efficiency gains to be had when an user decides to truncate based on Hamming distance.

Here we compute the number of elements within a given Hamming distance, and stop if we have evaluated that number of elements. This gives a good speed up if the Hamming distance is small.

In principle, this could also be done in the iterative matvec code, but I did not observe a speed up when I tried, so will follow up with another PR if that indeed pans out.

@nonhermitian nonhermitian changed the title [WIP] Stop col_norm early for < max hamming distance Stop col_norm early for < max hamming distance Mar 24, 2023
@nonhermitian nonhermitian merged commit b0b7174 into main Mar 24, 2023
@nonhermitian nonhermitian deleted the distance_speed_up branch March 24, 2023 17:21
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.

1 participant