Created
September 3, 2011 12:25
-
-
Save bxt/1191108 to your computer and use it in GitHub Desktop.
Sed speed test -n option and printin vs negated adress vs quitting
This file contains hidden or 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
| 02:16 bernhard@horst:~> time for i in {1..10000}; do sed -n -e '1p' edt.txt > /dev/null;done | |
| real 1m23.424s | |
| user 0m44.611s | |
| sys 0m8.801s | |
| 02:18 bernhard@horst:~> time for i in {1..10000}; do sed -e '1!d' edt.txt > /dev/null;done | |
| real 1m23.036s | |
| user 0m45.827s | |
| sys 0m10.609s | |
| 04:08 bernhard@horst:~> time for i in {1..10000}; do sed -e '1q' edt.txt > /dev/null;done | |
| real 0m25.125s | |
| user 0m4.660s | |
| sys 0m14.337s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment