[llvm-bugs] [Bug 28820] New: Compile gets 10x slower (from 40s to 7m40s) due to using -g (on compiles with -fno-execptions)

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Aug 2 14:12:51 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=28820

            Bug ID: 28820
           Summary: Compile gets 10x slower (from 40s to 7m40s) due to
                    using -g (on compiles with -fno-execptions)
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: DebugInfo
          Assignee: unassignedbugs at nondot.org
          Reporter: nicolasweber at gmx.de
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Get the attachment in comment 20 at
https://bugs.chromium.org/p/chromium/issues/detail?id=630502#c20 (it's too
large for llvm bugzilla). Then run:


$ time bin/clang++ -arch x86_64 -O2 -isysroot $(xcrun -show-sdk-path)
-std=c++11 -c foo.ii 

real    0m38.955s
user    0m37.844s
sys    0m1.105s


$ time bin/clang++ -arch x86_64 -O2 -isysroot $(xcrun -show-sdk-path)
-std=c++11 -c foo.ii -g
real    1m0.349s
user    0m58.321s
sys    0m2.016s


This seems like fairly reasonable overhead from debug info.  But:


$ time bin/clang++ -arch x86_64 -O2 -isysroot $(xcrun -show-sdk-path)
-std=c++11 -c foo.ii -g -fno-exceptions 

real    7m40.507s
user    7m38.627s
sys    0m1.880s


Enabling just -fno-execptions without -g is free:

$ time bin/clang++ -arch x86_64 -O2 -isysroot $(xcrun -show-sdk-path)
-std=c++11 -c foo.ii -fno-exceptions

real    0m41.568s
user    0m41.210s
sys    0m0.354s

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160802/8e7ca684/attachment.html>


More information about the llvm-bugs mailing list