mr-tron / base58 Goto Github PK
View Code? Open in Web Editor NEWFast implementation of base58 encoding on golang.
License: MIT License
Fast implementation of base58 encoding on golang.
License: MIT License
% dd if=/dev/random of=abcd10 bs=1 count=10000
10000+0 records in
10000+0 records out
10000 bytes transferred in 0.051649 secs (193615 bytes/sec)
% dd if=/dev/random of=abcd100 bs=1 count=100000
100000+0 records in
100000+0 records out
100000 bytes transferred in 0.423879 secs (235916 bytes/sec)
% dd if=/dev/random of=abcd1000 bs=1 count=1000000
1000000+0 records in
1000000+0 records out
1000000 bytes transferred in 4.197053 secs (238262 bytes/sec)
% time ./base58 -i abcd10 | wc -c
13658
./base58 -i abcd10 0.12s user 0.01s system 93% cpu 0.132 total
% time ./base58 -i abcd100 | wc -c
136567
./base58 -i abcd100 11.44s user 0.17s system 95% cpu 12.184 total
% time ./base58 -i abcd1000 | wc -c
1365659
./base58 -i abcd1000 1298.50s user 20.66s system 93% cpu 23:33.18 total
in := "1111111111"
fmt.Println("in: ", in)
v, err := base58.Decode(in)
fmt.Println("decode:", v, err)
fmt.Println("encode again:", base58.Encode(v))
Try this with your function names instead (by the way, I suggest you get rid of Trivial*
and rename the fast versions to Encode
and Decode
). Output should look like this:
in: 1111111111
decode: [0 0 0] <nil>
encode again: 111
need to find author and check license for compatibility and add to authors
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.