3 ms·
That would depend upon the shell that you used. GNU Bash in particular is not known for speed, although this is just a question of pipes. I remember that cdrec
by chasil 5y ago
That would depend upon the shell that you used. GNU Bash in particular is not known for speed, although this is just a question of pipes.
I remember that cdrecord has explict advice on raising pipe buffer size to avoid an underun (that will render a CD unusable). Perhaps pipe tuning here might also impact performance.
I don't know if dash will increase performance in this particular case.
$ rpm -qi dash | tail -3
DASH is a POSIX-compliant implementation of /bin/sh that aims to be as small as
possible. It does this without sacrificing speed where possible. In fact, it is
significantly faster than bash (the GNU Bourne-Again SHell) for most tasks.
- tyingq 5y agoLooking at the shell script, I think it will always be somewhat slow as it's sorting twice. One pass to sort the words so that "uniq -c" can work correctly, then the reverse numeric sort. I don't think the shell used matters, as most of the cpu time is in the sorting.