2 ms·
That's pretty unscientific :-) To measure anything that fast reliably you have to do it more than once: [ron@mickey:~/foo]$ cat foo foo [ron@
by lisper 17y ago
That's pretty unscientific :-) To measure anything that fast reliably you have to do it more than once:
[ron@mickey:~/foo]$ cat foo
foo
[ron@mickey:~/foo]$ time for i in {1..1000}; do cp foo foo.c.$i; done
real 0m2.705s
user 0m0.524s
sys 0m2.190s
[ron@mickey:~/foo]$ time for i in {1..1000}; do ln foo foo.l.$i; done
real 0m2.618s
user 0m0.486s
sys 0m2.008s
- jrockway 17y agoNow you are measuring the speed of the fork/exec call. To really do this right you need to write a small script that copies the file 1000 times or creates a hard link 1000 times.
- lisper 17y agoNo, fork is a lot faster than disk I/O: [ron@mickey:~]$ time for i in {1..1000}; do echo foo>/dev/null; done real 0m0.064s user 0m0.039s sys 0m0.025s