<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Compile gets 10x slower (from 40s to 7m40s) due to using -g (on compiles with -fno-execptions)"
   href="https://llvm.org/bugs/show_bug.cgi?id=28820">28820</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Compile gets 10x slower (from 40s to 7m40s) due to using -g (on compiles with -fno-execptions)
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>DebugInfo
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>nicolasweber@gmx.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Get the attachment in <a href="show_bug.cgi?id=28820#c20">comment 20</a> at
<a href="https://bugs.chromium.org/p/chromium/issues/detail?id=630502#c20">https://bugs.chromium.org/p/chromium/issues/detail?id=630502#c20</a> (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</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>