Use a modern fast hash
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 13.6k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
We might want to get a modern fast hash function like t1ha into the tree and use it throughout the codebase, including in "unique". The current 2-characters-at-a-time hash function that we use in a few places including "unique" is probably not the fastest we can have with decent properties on modern CPUs. https://github.com/erthink/t1ha
Stretch goal: use a keyed hash with a key randomly generated at startup to make JtR immune to hashDoS. Would probably have slight performance impact at least on reading the key from a global variable each time a hash is computed?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the current 2-characters-at-a-time hash implementation and its uses, including "unique". Review the linked t1ha project and assess how it fits the supported CPUs and build targets. Done means a modern fast hash is used throughout the identified code paths; the keyed hash is only a stretch goal.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100