Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pythongh-117151: optimize BufferedWriter(), do not buffer writes that…
… are equal to the buffer size. avoid extra memory copy. BufferedWriter() was buffering calls that are the exact same size as the buffer. it's a very common case to read/write in blocks of the exact buffer size. it's pointless to copy a full buffer, it's costing extra memory copy and the full buffer will have to be written in the next call anyway.
- Loading branch information