3 ms·
From looking at the implementation of yes [0], I would say it follows closely the GNU coreutils implementation [1]. It allocates and re-uses a buffer to speed t
by felixr 6y ago
From looking at the implementation of yes [0], I would say it follows closely the GNU coreutils implementation [1]. It allocates and re-uses a buffer to speed things up [2] and does not implement the old simple version [3] (or the even simpler OpenBSD [4])
[0]: https://github.com/uutils/coreutils/blob/master/src/uu/yes/src/yes.rs https://github.com/uutils/coreutils/blob/master/src/uu/yes/s...
[1]: https://github.com/coreutils/coreutils/blob/master/src/yes.c https://github.com/coreutils/coreutils/blob/master/src/yes.c
[2]: http://github.com//coreutils/coreutils/commit/35217221c211f3116f374f305654462195aa634a http://github.com//coreutils/coreutils/commit/35217221c211f3...
[3]: https://github.com/coreutils/coreutils/blob/ccbd1d7dc5189f4637468a8136f672e60ee0e531/src/yes.c https://github.com/coreutils/coreutils/blob/ccbd1d7dc5189f46...
[4]: https://github.com/openbsd/src/blob/master/usr.bin/yes/yes.c https://github.com/openbsd/src/blob/master/usr.bin/yes/yes.c