Change #262009
| Category | gcoreutils |
| Changed by | Collin Funk <collin.funk1@gmail.com> |
| Changed at | Sat 21 Mar 2026 23:50:33 |
| Repository | git://git.savannah.gnu.org/coreutils.git |
| Project | gcoreutils |
| Branch | master |
| Revision | 4bc336b7ce2e744632e6a0b532590edfe84f83bc |
Comments
tac: avoid unnecessary standard output buffering
This has removes a tiny amount of overhead:
$ seq 10000000 > input
$ perf stat -e cpu-clock --repeat 1000 taskset 1 ./src/tac \
input 2>&1 > /dev/null | grep -F 'seconds time'
0.095707 +- 0.000223 seconds time elapsed ( +- 0.23% )
$ perf stat -e cpu-clock --repeat 1000 taskset 1 ./src/tac-prev \
input 2>&1 > /dev/null | grep -F 'seconds time'
0.1009378 +- 0.0000995 seconds time elapsed ( +- 0.10% )
* src/tac.c (output): Use full_write instead of fread since we already
buffer the output ourselves.
Changed files
- src/tac.c