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

Make go run fast #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

RobinJadoul
Copy link

This speeds up the validity checking in the go solver, and adds a main function so that it can be used directly.
The speedup comes from avoiding more memory allocations and string building, by replacing the binary string check with a count of the leading zeroes of the first 8 hash bytes as uint64 (big endian).
This breaks for difficulty > 64, but that is out of range for any reasonable PoW either way.

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.

1 participant