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
Parallel vanity #18
Parallel vanity #18
Conversation
1 similar comment
for i:=0; i < cpu; i++ { | ||
go func() { | ||
for i := 0; i < max; i++ { | ||
if found != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
found needs to be protected, this will fail a race detector.
nk/main.go
Outdated
wg.Add(cpu) | ||
for i:=0; i < cpu; i++ { | ||
go func() { | ||
for i := 0; i < max; i++ { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should max be divided up by cpu
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if they are concurrent we are giving more chance to find it, but maybe that is not intuitive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree but I think max should still be honored.
nk/main.go
Outdated
wg.Done() | ||
return | ||
} | ||
spin := spinners[i%len(spinners)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only want one spinner no?
changed console spinner to be timer based
I fixed the comments - but just noticed that you have an open pr that does the same thing. You can pick the one you want. |
Take a look at it and let me know your thoughts. |
modified to use all available cores when fishing for a vanity key.