-
Notifications
You must be signed in to change notification settings - Fork 34
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
perf: use faster and lightweight base58 conversion #101
base: master
Are you sure you want to change the base?
Conversation
See https://github.com/trezor/trezor-crypto/blob/master/base58.c#L152 We are consider using the fast implement of base58 conversion which is more fast and lightweight to instead of big.int
Why not use base58? |
Hello @jjz There is no difference in the bigint implement and fast implement. The PR is an attempt trying to do performance optimization. |
@detailyang. Now, we have many other more important things(chain, transaction pool and etc.)to do and don't have enough time to verify this pr. Of course, we will verify it after October. Thanks a lot! |
@fffreedom never mind. Let's suspend it and do something important :) |
@fffreedom the PR is reviewed? |
Recently I found there is faster and lightweight base58 conversion in https://github.com/trezor/trezor-crypto/blob/master/base58.c. And the original base58 implement now is based on the bigint which is more expensive especially in memory allocated.
Below is the benchmark by
go test -v -bench=. -benchmem -count=3 ./util/...
:Now the test coverage is 100% in
util/base58.go
and it looks like can be updated on the fly:)