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

Parallel vanity #18

Closed
wants to merge 3 commits into from
Closed

Parallel vanity #18

wants to merge 3 commits into from

Conversation

aricart
Copy link
Member

@aricart aricart commented Jul 22, 2019

modified to use all available cores when fishing for a vanity key.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 70

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 83.062%

Totals Coverage Status
Change from base Build 67: 0.0%
Covered Lines: 255
Relevant Lines: 307

💛 - Coveralls

1 similar comment
@coveralls
Copy link

Pull Request Test Coverage Report for Build 70

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 83.062%

Totals Coverage Status
Change from base Build 67: 0.0%
Covered Lines: 255
Relevant Lines: 307

💛 - Coveralls

for i:=0; i < cpu; i++ {
go func() {
for i := 0; i < max; i++ {
if found != nil {
Copy link
Member

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++ {
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

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)]
Copy link
Member

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
@aricart
Copy link
Member Author

aricart commented Jul 22, 2019

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.

@aricart aricart closed this Jul 22, 2019
@derekcollison
Copy link
Member

Take a look at it and let me know your thoughts.

@aricart aricart deleted the parallel-vanity branch October 30, 2019 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants