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
This commit creates and an example test file for the baes58 package that
integrates nicely with Go's example tooling.
This allows the example output to be tested as a part of running the
normal Go tests to help ensure it doesn't get out of date with the code.
- Call out in README.md that this is modified base58 (it's not the same as
normal base58)
- Remove the blurb about test_coverage.txt since it is no longer needed
now that the repo now has coveralls integrated
- Rename base58_check[_test].go -> basecheck[_test].go. Since Go treats
_<ext> special in some cases like for tests and conditional OS and
architecture compilation, it's a good idea to avoid naming files with
them to ensure a new special meaning doesn't break builds in the future