Bro and clang++

I haven't done any extensive testing with the resulting binary (although it appears to run). The cool part was that I built the full Bro binary in 1:47 with make -j2 on my laptop.

  .Seth

Nevermind. I thought that was pretty fast, but actually I guess with g++ I can build it in 1:39. At least Bro appears to build with clang++. :slight_smile:

  .Seth

I ran Bro (just loading conn.bro) with a large mixed traffic trace file and the resulting binary was slightly slower than the g++ built binary but it was a near imperceptible slow down.

This article seems to pretty accurately show speed differences between GCC compiled binaries and Clang (among other LLVM backed compilation techniques).
   http://www.phoronix.com/scan.php?page=article&item=llvm_gcc_dragonegg28&num=1

.Seth

I ran Bro (just loading conn.bro) with a large mixed traffic trace
file and the resulting binary was slightly slower than the g++ built
binary but it was a near imperceptible slow down.

That sounds promising. Can you try with loading the http-* scripts?

   Compiler Benchmarks Of GCC, LLVM-GCC, DragonEgg, Clang - Phoronix

Nice, I need to read that more carefully.

Robin

[seth@Blake tmp]$ time ~/bro/bro.git/src/bro.clang++ -r ~/tracefiles/my.trace -f "ip" enable-ext-logging http http-reply http-request http-ext weird alarm

real 1m0.284s
user 0m57.373s
sys 0m1.478s

[seth@Blake tmp]$ time ~/bro/bro.git/src/bro.gcc -r ~/tracefiles/my.trace -f "ip" enable-ext-logging http http-reply http-request http-ext weird alarm

real 0m59.266s
user 0m55.851s
sys 0m1.547s

Once again, slower, but just barely.

  .Seth

Likewise promising! Thanks,

Robin