aboutsummaryrefslogtreecommitdiff
path: root/lib/std/os/linux
diff options
context:
space:
mode:
authorProkop Randacek <prokop@rdck.dev>2024-02-02 07:51:30 +0100
committerAndrew Kelley <andrew@ziglang.org>2024-02-09 14:02:57 -0800
commit6fb23542fe8503ba5c97bde950b1ebbe8f07f951 (patch)
tree394f6d549a08d4319c3d78acfb05120b4a114da4 /lib/std/os/linux
parent731ff120d0ee68f3ce2eb30648eeaf96a283142d (diff)
downloadzig-6fb23542fe8503ba5c97bde950b1ebbe8f07f951.tar.gz
zig-6fb23542fe8503ba5c97bde950b1ebbe8f07f951.zip
Buffer the logging function
The default logging function used to have no buffer. So a single log statement could result in many individual write syscalls each writing only a couple of bytes. After this change the logging function now has a 4kb buffer. Only log statements longer than 4kb now do multiple write syscalls. 4kb is the default bufferedWriter size and was choosen arbitrarily. The downside of this is that the log function now allocates 4kb more stack space but I think that is an acceptable trade-off.
Diffstat (limited to 'lib/std/os/linux')
0 files changed, 0 insertions, 0 deletions