Hacker News new | ask | show | jobs
by renshaw 4593 days ago
Author here. The makefiles I'm using are on github:

https://github.com/dwrensha/capnproto-rust/blob/master/Makef...

https://github.com/dwrensha/capnproto/blob/benchmark/c%2B%2B...

I compiled libcapnp with the latest Clang g++ that ships with XCode. It perhaps would be more fair to also compile the C++ benchmarks with Clang, instead of the Macports gcc4.8 that I'm using, but unfortunately Clang barfs on some template hackery in the benchmark driver.

3 comments

That would be quite useful. Otherwise it's very hard to tease apart the differences between optimization back ends of GCC and LLVM vs the Rust and C++ front ends. I feel like I have seen benchmarks showing differences around 5-20% between LLVM and GCC in speed, so the it will have an effect.
Update: the compilation error was actually due to some missing includes. https://github.com/kentonv/capnproto/pull/47

Switching compilers on the C++ side doesn't seem to make a significant difference in performance.

You may go a little faster with `--opt-level=3` and no `-Z debug-info` for the Rust.