Skip to content

Instantly share code, notes, and snippets.

@matiaskorhonen
Created July 14, 2010 08:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matiaskorhonen/475197 to your computer and use it in GitHub Desktop.
Save matiaskorhonen/475197 to your computer and use it in GitHub Desktop.
matt@foo:~/$ ls -lh *.tmp
-rw-r--r-- 1 matt matt 176M 2010-07-14 11:45 file.tmp
matt@foo:~/$ time sha1sum file.tmp
b67e8d00cdce9de8c04b6514ba329da81693f936 file.tmp
real 0m0.806s
user 0m0.750s
sys 0m0.040s
matt@foo:~/$ time ruby -r "digest/sha1" -e 'puts Digest::SHA1.file("file.tmp")'
b67e8d00cdce9de8c04b6514ba329da81693f936
real 0m0.576s
user 0m0.460s
sys 0m0.100s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment