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

histo slowdown #6

Closed
caseywdunn opened this issue Nov 29, 2023 · 3 comments
Closed

histo slowdown #6

caseywdunn opened this issue Nov 29, 2023 · 3 comments

Comments

@caseywdunn
Copy link
Owner

In this commit a4b6dfd I changed from vectors to hashmaps for compiling the histograms, so I could get all values and validate number of kmers. It led to a slowdown from about 30s to 90s for Consolidating chunks and creating histograms.

Try nohash for speedup. https://stackoverflow.com/questions/70551997/faster-hashmap-for-sequential-keys

If that fails maybe go back to vectors.

@caseywdunn
Copy link
Owner Author

caseywdunn added a commit that referenced this issue Dec 1, 2023
@caseywdunn
Copy link
Owner Author

Encapsulating data structure for Histogram inside new Histogram structure leads to slight further slow down to 101s. But now I can change internals in one place without needing a bunch of type changes all over the code.

@caseywdunn
Copy link
Owner Author

Now takes 38s with IntMap instead of HashMap. So back to almost the same speed as using a vector. Wow!

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

No branches or pull requests

1 participant