Skip to content

Instantly share code, notes, and snippets.

@rshk
Created November 8, 2012 13:06
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 rshk/4038697 to your computer and use it in GitHub Desktop.
Save rshk/4038697 to your computer and use it in GitHub Desktop.
File parsing performance comparison
$ time python parse.py
real 0m0.065s
user 0m0.060s
sys 0m0.000s
$ md5sum out*
f43b4dd719f7d0c11012061b50dd96a8 out1.txt
169344f96bf67ce3dcd585802f116c05 out2.txt
$ ls -lh out*
-rw-r--r-- 1 samu samu 528K 2012-11-08 14:01 out1.txt
-rw-r--r-- 1 samu samu 440K 2012-11-08 14:01 out2.txt
$ time bash parse.sh
real 0m12.399s
user 0m0.850s
sys 0m0.670s
$ md5sum out*
ac45d031ba52dc98c1fd4dd463f63c87 out1.txt
b8af90144fe2dce2789442f56e3c252e out2.txt
$ ls -lh out*
-rw-r--r-- 1 samu samu 528K 2012-11-08 14:02 out1.txt
-rw-r--r-- 1 samu samu 440K 2012-11-08 14:02 out2.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment