Created
August 5, 2014 15:11
-
-
Save acdha/8b80bd3829bb411cac2b to your computer and use it in GitHub Desktop.
Simple comparison of SHA-256 performance reading random bytes from SSD (context: http://www.avpreserve.com/wp-content/uploads/2014/08/ChecksumComparisons.pdf)
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
time ./simple-sha256.pl 1GB 10GB | |
1GB 1872c9662b6cd15fbbb66be3a760d4bd02ab5077429db21103ac8f63538d8a5f | |
10GB 732377e7f4a2abdc13ddfa1eb4c9c497fd2a2b294674d056cf51581b47dd586d | |
real 1m31.644s | |
user 1m26.695s | |
sys 0m4.465s | |
SHA256(1GB)= 1872c9662b6cd15fbbb66be3a760d4bd02ab5077429db21103ac8f63538d8a5f | |
SHA256(10GB)= 732377e7f4a2abdc13ddfa1eb4c9c497fd2a2b294674d056cf51581b47dd586d | |
real 1m21.558s | |
user 1m16.691s | |
sys 0m4.407s | |
time /usr/local/Cellar/openssl/1.0.1h/bin/openssl sha256 1GB 10GB | |
SHA256(1GB)= 1872c9662b6cd15fbbb66be3a760d4bd02ab5077429db21103ac8f63538d8a5f | |
SHA256(10GB)= 732377e7f4a2abdc13ddfa1eb4c9c497fd2a2b294674d056cf51581b47dd586d | |
real 1m5.670s | |
user 0m59.822s | |
sys 0m5.102s | |
time openssl md5 1GB 10GB | |
MD5(1GB)= fbdb5c269cfeec36232828435cd924a0 | |
MD5(10GB)= 2dd26c4d4799ebd29fa31e48d49e8e53 | |
real 0m37.603s | |
user 0m31.726s | |
sys 0m4.681s | |
MD5(1GB)= fbdb5c269cfeec36232828435cd924a0 | |
MD5(10GB)= 2dd26c4d4799ebd29fa31e48d49e8e53 | |
real 0m31.068s | |
user 0m23.406s | |
sys 0m5.101s |
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
#!/usr/bin/perl | |
use Digest::file qw(digest_file_hex); | |
foreach my $file (@ARGV) { | |
print $file, "\t", digest_file_hex($file, 'SHA-256'), "\n"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment