[all-commits] [llvm/llvm-project] a3aa91: [Support] Improve Windows performance of buffered ...

Andrew Ng via All-commits all-commits at lists.llvm.org
Wed Apr 5 03:06:03 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a3aa916d019c8deb10c750acecdef650b3365f22
      https://github.com/llvm/llvm-project/commit/a3aa916d019c8deb10c750acecdef650b3365f22
  Author: Andrew Ng <andrew.ng at sony.com>
  Date:   2023-04-05 (Wed, 05 Apr 2023)

  Changed paths:
    M llvm/lib/Support/raw_ostream.cpp

  Log Message:
  -----------
  [Support] Improve Windows performance of buffered raw_ostream

The "preferred" buffer size for raw_ostream is set to BUFSIZ which on
Windows is only 512. This results in more calls to write and this
overhead can have a significant negative impact on performance,
especially when Anti-Virus is also involved.

Therefore increase the "preferred" buffer size to 16KB for Windows.

One example of where this helps is the LLD --Map option which dumps out
the symbol map for a link. In a link of UE4, this change has been seen
to improve the performance of the symbol map writing by more than a
factor of 6.

Differential Revision: https://reviews.llvm.org/D147340




More information about the All-commits mailing list