Created
November 20, 2015 03:42
-
-
Save agran/1d0165d8358296a73d31 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void testBase_58_speed() { | |
Stopwatch stopwatchAll = new Stopwatch(); | |
for (int i = 0; i < 10000000; i++) { | |
String randStr = Long.toString((long)(Math.random()*1000000000)); | |
Base58.decode(Base58.encode(randStr.getBytes())); | |
} | |
System.out.println("Google Base58 (old): "+stopwatchAll.elapsedTime()); | |
stopwatchAll = new Stopwatch(); | |
for (int i = 0; i < 10000000; i++) { | |
String randStr = Long.toString((long)Math.random()*1000000000); | |
Base58.decode(Base58.encode(randStr.getBytes())); | |
} | |
System.out.println("Ronald W Hoffman Base58 (new): "+stopwatchAll.elapsedTime()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment