[Users] Q. re: tags (tagging locally-saved messages for use outside Claws)
Victoria Stuart (gmail)
victoria.a.stuart at gmail.com
Sat Mar 25 19:58:15 CET 2017
Nice comparison; very interesting -- good to know!
This adds up over huge numbers of records processed.
Thank you for sharing. :-D
----------------------------------------
$ cat dash.sh
#!/bin/dash
for i in `seq 1 1000`
do
basename "$PWD" >/dev/null
done
exit
$ cat bash.sh
#!/bin/bash
for i in `seq 1 1000`
do
printf "${PWD##*/}\n" >/dev/null
done
exit
$ time ./dash.sh
real 0m0.468s
user 0m0.010s
sys 0m0.053s
$ time ./bash.sh
real 0m0.042s
user 0m0.033s
sys 0m0.007s
0.468/0.042 = 11.1428 real-time difference,
[basename "$PWD"] vs. [printf "${PWD##*/}\n"]
http://stackoverflow.com/questions/556405/what-do-real-user-and-sys-mean-in-the-output-of-time1
----------------------------------------
$ cat dash.sh
#!/bin/dash
for i in `seq 1 1000`
do
printf "${PWD##*/}\n" >/dev/null
done
exit
$ cat bash.sh
#!/bin/bash
for i in `seq 1 1000`
do
basename "$PWD" >/dev/null
done
exit
$ time ./dash.sh
real 0m0.017s
user 0m0.007s
sys 0m0.007s
$ time ./bash.sh
real 0m0.531s
user 0m0.030s
sys 0m0.063s
0.531/.017 = 31.2352-fold difference,
[basename "$PWD"] vs. [printf "${PWD##*/}\n"]
==============================================================================
More information about the Users
mailing list