[PATCH v2] libstdc++: basic_filebuf: don't flush more often than necessary.

2022-10-06 Thread Charles-Francois Natali via Gcc-patches
`basic_filebuf::xsputn` would bypass the buffer when passed a chunk of size 1024 and above, seemingly as an optimisation. This can have a significant performance impact if the overhead of a `write` syscall is non-negligible, e.g. on a slow disk, on network filesystems, or simply during IO contenti

[PATCH] libstdc++: basic_filebuf: don't flush more often than necessary.

2022-09-05 Thread Charles-Francois Natali via Gcc-patches
`basic_filebuf::xsputn` would bypass the buffer when passed a chunk of size 1024 and above, seemingly as an optimisation. This can have a significant performance impact if the overhead of a `write` syscall is non-negligible, e.g. on a slow disk, on network filesystems, or simply during IO contenti