OSDN Git Service

Support: Improve performance of FileOutputBuffer on Windows
authorRui Ueyama <ruiu@google.com>
Fri, 6 Mar 2015 06:07:32 +0000 (06:07 +0000)
committerRui Ueyama <ruiu@google.com>
Fri, 6 Mar 2015 06:07:32 +0000 (06:07 +0000)
commit8617b3bb3e7b95c27f3ffa7220a2b7754d918adb
treea563fc22d38d9b8e97d52cd377618350733d1c8e
parent517e68fe7b4d16bc635ae75333641c16a8c595fa
Support: Improve performance of FileOutputBuffer on Windows

We extend an underlying file before mmap'ing it, but it's not needed
on Windows. Extending file is slow on Windows, so we should avoid doing that.
The difference gets larger as the size of an output file gets larger.
It shove off 2 seconds out of 25 seconds when linking chrome.dll with LLD,
for example.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231452 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Support/FileOutputBuffer.cpp