Try untying bitslice from internal mask
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 13.6k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
@solardiz in https://github.com/openwall/john/issues/4871#issuecomment-971467795:
(...) apparently when running with a mask, the bit depths are filled using the mask multiplier. This probably means we have efficiency loss when the mask multiplier isn't a multiple of 32 (which it usually isn't). For example, for the 676 seen in our default benchmark mask, the actual number of hashes computed is probably 704, and if so 28 hash computations or almost 4% of total are wasted. I didn't verify this and don't recall past discussions of it - but it's the only plausible explanation I have of what I saw in @sayan1an's host code. Despite of this wastage, it might be the most efficient way to implement mask in there (considering locality of reference).
I think we should try doing this differently, and see where it leads.
Perhaps as a first step though, search through the ML from back in 2015 or so when Sayantan wrote the code - maybe he already established that the current way of doing it is the best way? I find it hard to believe though.
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
No file or test is named. Start by searching the 2015 mailing-list discussion referenced in the issue, then inspect the mask multiplier and bit-depth behavior described in the linked issue comment and compare hash counts for the default benchmark mask. Done means establishing whether separating bitslice from the internal mask improves efficiency and identifying a viable implementation direction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- performance
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100