Branch: refs/heads/master
Home: https://github.com/btcsuite/btcutil
Commit: dca623d4ef069c804bf1c11274be8d8419c105a3
https://github.com/btcsuite/btcutil/commit/dca623d4ef069c804bf1c11274be8d8419c105a3
Author: Josh Rickmar <[email protected]>
Date: 2015-01-24 (Sat, 24 Jan 2015)
Changed paths:
A base58/alphabet.go
M base58/base58.go
A base58/genalphabet.go
Log Message:
-----------
Optimize base58 decoding.
This change introduces an autogenerated base58 digit table to remove
the need to find the index of a character in the modified base58
alphabet each time. Additionally, it removes some unnecessary big
integer allocations to cut down on the GC churn.
Before:
BenchmarkBase58Encode 20 64998995 ns/op 0.08 MB/s
BenchmarkBase58Decode 50 35965928 ns/op 0.19 MB/s
Now:
BenchmarkBase58Encode 20 64644351 ns/op 0.08 MB/s
BenchmarkBase58Decode 200 7914748 ns/op 0.86 MB/s