<html>
<head>
<base href="https://bugs.llvm.org/">
</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 - Preprocessing is much slower than GCC on small files"
href="https://bugs.llvm.org/show_bug.cgi?id=38430">38430</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Preprocessing is much slower than GCC on small files
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>6.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Frontend
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>husseydevin@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=20634" name="attach_20634" title="Makefile">attachment 20634</a> <a href="attachment.cgi?id=20634&action=edit" title="Makefile">[details]</a></span>
Makefile
Clang 6.0.1, installed from Termux repos.
GCC 8.2.0, installed from its-pointless.github.io
Termux, LG G3
System information:
Linux localhost 3.4.113-LineageXTD-R7 #1 SMP PREEMPT Fri Jun 15 20:42:06 CEST
2018 armv7l Android
Termux-packages arch:
arm
Android version:
8.1.0, LineageOS
Device manufacturer:
LGE
Device model:
LG-D851
Note that I have gotten similar results on Ubuntu WSL, but I need to do further
testing.
While preprocessing very large files has a similar result with clang sometimes
being faster, clang has terrible performance when invoked many times in a row
with small files:
For example, cd to your main include directory, and run these shell commands:
mkdir -p ~/cpptest
I=0
for file in *.h; do
echo "#include <$file>" > ~/cpptest/$I.h
I=$((I+1));
done
Now, put the attached Makefile in ~/cpptest and time make, first with
CPP="clang-6.0 -E", make clean, and next with CPP="gcc-8 -E". Remove any lines
or files that error and run again.
$ time make CPP="clang-6.0 -E"
real 1m14.787s
user 0m46.860s
sys 0m22.390s
$ make clean
$ time make CPP="gcc-8 -E"
real 0.19.910s
user 0m11.390s
sys 0m5.880s
$</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>