]> granicus.if.org Git - llvm/commit
Improve performance TokenizeWindowsCommandLine
authorRui Ueyama <ruiu@google.com>
Wed, 27 Dec 2017 08:59:52 +0000 (08:59 +0000)
committerRui Ueyama <ruiu@google.com>
Wed, 27 Dec 2017 08:59:52 +0000 (08:59 +0000)
commitf4c03144e1252d32b18a43a1549fe520eb29cd01
tree435c61e0e88f36c189ec900d70a39eed46055ebc
parente7f98a969c1ae60aefd39edaf98094379c51ead7
Improve performance TokenizeWindowsCommandLine

Patcy by Takuto Ikuta.

This patch reduces lld link time of chromium's blink_core.dll in
component build.

Total size of input argument in .directives become nearly 300MB in the
build and calling many strchr and assert becomes bottleneck.

On my desktop machine, 4 times stats of the link time are like below.
Improved around 10%.

This patch
TotalSeconds : 13.4918885
TotalSeconds : 13.9474257
TotalSeconds : 13.4941082
TotalSeconds : 13.6077962
Avg : 13.63530465

master
TotalSeconds : 15.6938531
TotalSeconds : 15.7022508
TotalSeconds : 15.9567202
TotalSeconds : 14.5851505
Avg : 15.48449365

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

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