2 ms·
It certainly has a fast path, it just mixes it up with lseek() for filesystems like /proc: https://github.com/coreutils/coreutils/blob/9de1d153f82243aeaaf19b0e5
by Freaky 6y ago
It certainly has a fast path, it just mixes it up with lseek() for filesystems like /proc: https://github.com/coreutils/coreutils/blob/9de1d153f82243aeaaf19b0e5da2345f9b8652e3/src/wc.c#L262-L294 https://github.com/coreutils/coreutils/blob/9de1d153f82243ae...
FreeBSD just uses fstat: https://github.com/freebsd/freebsd-src/blob/e4b8deb222278b2a12c9c67021b406625f5be301/usr.bin/wc/wc.c#L243-L261 https://github.com/freebsd/freebsd-src/blob/e4b8deb222278b2a...