<div dir="ltr">+Kuba, Anna<div><br></div><div>Sorry for the late response. Unfortunately, I don't have a Mac machine to experiment on...</div><div>Do you have the numbers for plain -fsanitize=address, or plain -fsanitize=undefined, or</div><div>subset of UBSan checks, such as -fsanitize=shift, -fsanitize=alignment, etc?</div><div><br></div><div>We haven't observe visible slowdown recently, however we usually run ASan on Linux, and use at least -O1.</div><div>Maybe the situation improved in trunk after recent Anna's fixes.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 1, 2015 at 11:19 PM, Jeffrey Walton <span dir="ltr"><<a href="mailto:noloader@gmail.com" target="_blank">noloader@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Alexey,<br>
<span class=""><br>
>> Is there anything obvious I am missing that might affect the<br>
>> performance between 3.5 and 3.6? Like is something enabled that used<br>
>> to be disabled or missing?<br>
</span>> ...<br>
<span class="">> Interesting. Could you share the performance numbers, and try to figure out<br>
> which specific sanitizer<br>
> is causing a problem (i.e. try to compare just -fsanitize=address, and then<br>
> various flavors of -fsanitize=undefined<br>
> one by one: -fsanitize=shift, -fsanitize=null etc.). We are not aware of<br>
> known performance degradation under<br>
> sanitizers in 3.6 release.<br>
<br>
</span>Here are the performance numbers that I am experiencing. All tests<br>
were run on the same machine (OS X 10.8.5, fully patched).<br>
<br>
3.4.2: ~5 minutes<br>
3.5: ~7 minutes, 30 seconds<br>
3.6: ~9 minutes<br>
<br>
I'm used to building with Clang 3.3 and 3.4, so I wanted to include<br>
one of those versions. With 3.6, the time has nearly doubled.<br>
<br>
Are the numbers above on par with what you would expect?<br>
<br>
Jeff<br>
<br>
***** Crypto++ *****<br>
<br>
If interested, you can checkout Crypto++ with:<br>
<br>
svn checkout <a href="https://svn.code.sf.net/p/cryptopp/code/trunk/c5" target="_blank">https://svn.code.sf.net/p/cryptopp/code/trunk/c5</a> cryptopp<br>
<br>
Tweaks to the GNUmakefile include: -g3 -Os -fPIC -stdlib=libc++<br>
-fsanitize=address -fsanitize=undefined<br>
<br>
A full GNUmakefile diff is available at <a href="http://pastebin.com/3mqEBKzP" target="_blank">http://pastebin.com/3mqEBKzP</a>.<br>
<br>
***** Clang 3.4.2 *****<br>
<br>
Elapsed time: 01:17:06 - 01:12:05 ~= 5 minutes.<br>
<br>
$ export CXX=/usr/local/bin/clang++<br>
$ $CXX --version<br>
clang version 3.4.2 (tags/RELEASE_34/dot2-final)<br>
Target: x86_64-apple-darwin12.6.0<br>
Thread model: posix<br>
$ date && make static && date<br>
Thu Apr 2 01:12:05 EDT 2015<br>
/usr/local/bin/clang++ -DNDEBUG -g3 -Os -fPIC -stdlib=libc++<br>
<span class="">-fsanitize=address -fsanitize=undefined -Wall<br>
-Wno-tautological-compare -Wno-unused-value -Wno-unused-variable<br>
</span>-Wno-unused-parameter -Wno-unused-function -I/usr/lib/c++/v1<br>
-DCRYPTOPP_DISABLE_ASM -pipe -c 3way.cpp<br>
/usr/local/bin/clang++ -DNDEBUG -g3 -Os -fPIC -stdlib=libc++<br>
<span class="">-fsanitize=address -fsanitize=undefined -Wall<br>
-Wno-tautological-compare -Wno-unused-value -Wno-unused-variable<br>
</span>-Wno-unused-parameter -Wno-unused-function -I/usr/lib/c++/v1<br>
<span class="">-DCRYPTOPP_DISABLE_ASM -pipe -c adler32.cpp<br>
...<br>
</span>/usr/local/bin/clang++ -DNDEBUG -g3 -Os -fPIC -stdlib=libc++<br>
<span class="">-fsanitize=address -fsanitize=undefined -Wall<br>
-Wno-tautological-compare -Wno-unused-value -Wno-unused-variable<br>
</span>-Wno-unused-parameter -Wno-unused-function -I/usr/lib/c++/v1<br>
-DCRYPTOPP_DISABLE_ASM -pipe -c zlib.cpp<br>
libtool -static -o libcryptopp.a 3way.o adler32.o algebra.o algparam.o<br>
arc4.o asn.o authenc.o base32.o base64.o ...<br>
ranlib libcryptopp.a<br>
Thu Apr 2 01:17:06 EDT 2015<br>
<br>
***** Clang 3.5 *****<br>
<br>
Elapsed time: 00:31:53 - 00:24:36 ~= 7 minutes, 30 seconds.<br>
<br>
$ export CXX=/usr/local/bin/clang++<br>
$ $CXX --version<br>
clang version 3.5.0 (tags/RELEASE_350/final)<br>
Target: x86_64-apple-darwin12.6.0<br>
Thread model: posix<br>
$ date && make static && date<br>
Thu Apr 2 00:24:36 EDT 2015<br>
/usr/local/bin/clang++ -DNDEBUG -g3 -Os -fPIC -stdlib=libc++<br>
<span class="">-fsanitize=address -fsanitize=undefined -Wall<br>
-Wno-tautological-compare -Wno-unused-value -Wno-unused-variable<br>
</span>-Wno-unused-parameter -Wno-unused-function -I/usr/lib/c++/v1<br>
-DCRYPTOPP_DISABLE_ASM -pipe -c 3way.cpp<br>
/usr/local/bin/clang++ -DNDEBUG -g3 -Os -fPIC -stdlib=libc++<br>
<span class="">-fsanitize=address -fsanitize=undefined -Wall<br>
-Wno-tautological-compare -Wno-unused-value -Wno-unused-variable<br>
</span>-Wno-unused-parameter -Wno-unused-function -I/usr/lib/c++/v1<br>
<span class="">-DCRYPTOPP_DISABLE_ASM -pipe -c adler32.cpp<br>
...<br>
</span>/usr/local/bin/clang++ -DNDEBUG -g3 -Os -fPIC -stdlib=libc++<br>
<span class="">-fsanitize=address -fsanitize=undefined -Wall<br>
-Wno-tautological-compare -Wno-unused-value -Wno-unused-variable<br>
</span>-Wno-unused-parameter -Wno-unused-function -I/usr/lib/c++/v1<br>
-DCRYPTOPP_DISABLE_ASM -pipe -c zlib.cpp<br>
libtool -static -o libcryptopp.a 3way.o adler32.o algebra.o algparam.o<br>
arc4.o asn.o authenc.o base32.o base64.o ...<br>
ranlib libcryptopp.a<br>
Thu Apr 2 00:31:53 EDT 2015<br>
<br>
***** Clang 3.6 *****<br>
<br>
Elapsed time: 2:17:01 - 02:07:53 ~= 9 minutes.<br>
<br>
$ export CXX=/usr/local/bin/clang++<br>
$ $CXX --version<br>
clang version 3.6.0 (tags/RELEASE_360/final)<br>
Target: x86_64-apple-darwin12.6.0<br>
Thread model: posix<br>
$ date && make static && date<br>
Thu Apr 2 02:07:53 EDT 2015<br>
/usr/local/bin/clang++ -DNDEBUG -g3 -Os -fPIC -stdlib=libc++<br>
<span class="">-fsanitize=address -fsanitize=undefined -Wall<br>
-Wno-tautological-compare -Wno-unused-value -Wno-unused-variable<br>
</span>-Wno-unused-parameter -Wno-unused-function -I/usr/lib/c++/v1<br>
-I/usr/lib/c++/v1 -DCRYPTOPP_DISABLE_ASM -pipe -c 3way.cpp<br>
/usr/local/bin/clang++ -DNDEBUG -g3 -Os -fPIC -stdlib=libc++<br>
<span class="">-fsanitize=address -fsanitize=undefined -Wall<br>
-Wno-tautological-compare -Wno-unused-value -Wno-unused-variable<br>
</span>-Wno-unused-parameter -Wno-unused-function -I/usr/lib/c++/v1<br>
-I/usr/lib/c++/v1 -DCRYPTOPP_DISABLE_ASM -pipe -c adler32.cpp<br>
...<br>
/usr/local/bin/clang++ -DNDEBUG -g3 -Os -fPIC -stdlib=libc++<br>
<span class="">-fsanitize=address -fsanitize=undefined -Wall<br>
-Wno-tautological-compare -Wno-unused-value -Wno-unused-variable<br>
</span>-Wno-unused-parameter -Wno-unused-function -I/usr/lib/c++/v1<br>
-I/usr/lib/c++/v1 -DCRYPTOPP_DISABLE_ASM -pipe -c zlib.cpp<br>
libtool -static -o libcryptopp.a 3way.o adler32.o algebra.o algparam.o<br>
arc4.o asn.o authenc.o base32.o base64.o ...<br>
ranlib libcryptopp.a<br>
Thu Apr 2 02:17:01 EDT 2015<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Alexey Samsonov<br><a href="mailto:vonosmas@gmail.com" target="_blank">vonosmas@gmail.com</a></div></div>
</div>