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

Exploring reversible hashing for k>32 #1519

Closed
betatim opened this issue Nov 15, 2016 · 4 comments
Closed

Exploring reversible hashing for k>32 #1519

betatim opened this issue Nov 15, 2016 · 4 comments
Labels

Comments

@betatim
Copy link
Member

betatim commented Nov 15, 2016

Motivated by #1441 we investigated different ways to store hash values with more than 64bits. This would allow you to have reversible hashing for k>32 k-mers.

Trial PRs:

Explored adding a new type that uses std::bitset or an array of bytes, or an array of different numerical types. One lesson learnt is that bitset does exactly that, packs the bits into integers in an array. Except it is smart about picking the size of the integer and can use vector instructions etc.

The khmer hashfunction uses shifts and ORs so it is hard to see how to speed things up.

The overall conclusion after some benchmarking was that this slowed down the hashing by >10x even for small k. Therefore we ditched it. Now using irreversible hashing for k>32.

@ctb
Copy link
Member

ctb commented Nov 15, 2016

cc #1426 #27 #60. I think #624 can be closed, too.

@ctb
Copy link
Member

ctb commented Nov 15, 2016

Irreversible hashing initial implementation: #1511

@betatim
Copy link
Member Author

betatim commented Nov 17, 2016

Another issue with thoughts in it #1490

@ctb
Copy link
Member

ctb commented Feb 16, 2017

Closing now that #1511 has been merged.

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

No branches or pull requests

3 participants