Feat/multi-core-parallel-salt-finding#10
Closed
Ahmad8864 wants to merge 2 commits into
Closed
Conversation
Owner
|
This is a crazy optimization for a task that takes no more than 30 seconds but I love it reviewing all the prs |
Owner
|
Closing in favor of #11 which includes multi-worker parallelism plus the early-exit optimization (massive perf win for rare targets). Your 8-core cap idea will be adopted into #11 — great call on leaving cores free for the user. Thank you @Ahmad8864 for the contribution! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
os.availableParallelism()) instead of one, significantly reducing salt search time on multi-core machinesAbortControllerChanges
lib/finder.mjsgetWorkerCount()helper;findSalt()rewritten to spawn N workers, aggregate progress, and resolve on first successDesign decisions
Test plan
getWorkerCount()returns 1, behaves like before