3 ms·
> but the simpler unbuffered implementations probably have a shorter latency to first line output I tested this by taking the freebsd (buffered) implementation
by masklinn 4y ago
> but the simpler unbuffered implementations probably have a shorter latency to first line output
I tested this by taking the freebsd (buffered) implementation, stripping all the iterations, and comparing it against a version which also strips all the buffering (so the latter would just `write(STDOUT_FILENO, "y\n", 2)`, and the former would first fill an 8k buffer then write that).
The unbuffered implementation has an edge of about 1%, for a variance of above 10%. The "shorter latency" is essentially nonexistent.