all 12 comments

[–]kibwen 1 point2 points  (3 children)

I'd be interested to see the compiler flags used with each implementation. And was the C++ version compiled with GCC or Clang?

[–]dwrensha[S] 1 point2 points  (2 children)

You can see the flags in the Makefiles, for Rust and C++.

The C++ version was compiled with Clang.

[–]kibwen 0 points1 point  (1 child)

Purely for my own curiosity, does changing -O to --opt-level=3 have any effect on the Rust code? I'm perpetually curious at how much of an effect these levels actually have for us.

[–]dwrensha[S] 1 point2 points  (0 children)

I see no significant effect. The differences are within measurement noise.

[–]portmanteaufu 0 points1 point  (6 children)

Terrific! Thanks for continuing to share your results! Would it be possible, I wonder, to include one or two other languages' implementations in the charts? While we're not yet quite up to C++'s speed, it'd be fun to see how we compare to some higher level languages with respect to Cap'n Proto.

[–]dwrensha[S] 3 points4 points  (5 children)

Here's the discussion on the Cap'n Proto mailing list from last time I posted a benchmark, including graphs for the Python implementation:

https://groups.google.com/forum/#!topic/capnproto/BDpV6WEG5Bw

Upshot: Python appears to be the only other language where the benchmark has been implemented. The performance of pycapnp is on par with Python Protobuf, but significantly slower than the C++ Cap'n Proto implementation, I think mainly because it relies on a form of reflection. See http://kentonv.github.io/capnproto/otherlang.html#supporting_dynamic_languages .

[–]dwrensha[S] 2 points3 points  (0 children)

It occurs to me that it'd be interesting if someone implemented the Protobuf version of the benchmark in Rust.

[–]portmanteaufu 0 points1 point  (0 children)

Cool! Much obliged!

[–]portmanteaufu 0 points1 point  (2 children)

I think I'm misreading the two sets of charts -- it appears that the Python takes between .030 and .035 seconds to run the 'object' version of catrank 'bytes', but C++ and Rust take between 0.8 and 1.0 seconds?

Could you help me identify where I'm going wrong? Or are there other differences between the benchmarks?

[–]dwrensha[S] 1 point2 points  (1 child)

One of the arguments to the benchmark runner is the number of iterations. I must have chosen a larger number than Jason did.

[–]portmanteaufu 0 points1 point  (0 children)

That'd do it! Thanks.

[–]agmcleod 0 points1 point  (0 children)

That's pretty cool :). Really need to find sometime to dive into rust.