3 ms·
For something somewhat related, see parts of this thread: https://news.ycombinator.com/item?id=14414610 https://news.ycombinator.com/item?id=14414610 Note tha
by e12e 9y ago
For something somewhat related, see parts of this thread:
https://news.ycombinator.com/item?id=14414610 https://news.ycombinator.com/item?id=14414610
Note that cat+gnu awk was faster than just gnu awk - but mawk was faster still (reading a not entirely small file).
And in a similar vein of gp comparing Gnu and Openbsd, note that openbsd cat is a little more convoluted than the simplest possible implementation (at least to my eyes):
https://github.com/openbsd/src/blob/master/bin/cat/cat.c https://github.com/openbsd/src/blob/master/bin/cat/cat.c
https://github.com/coreutils/coreutils/blob/master/src/cat.c https://github.com/coreutils/coreutils/blob/master/src/cat.c
(That is, Gnu "cat" and OpenBSD "cat" are less different than Gnu "yes" and OpenBSD "yes").