News for hackers. Stuff that matters.
Re:Updated benchmark: capnproto-rust vs. c++ by steveklabnik on Wednesday January 15, 2014 @08:33PM (#7067472)
I wonder if it'd be instructive to have a Ruby or Python benchmark too, just to show how much you gain by using a lower-level language.
Re:Updated benchmark: capnproto-rust vs. c++ by dwrensha on Wednesday January 15, 2014 @08:34PM (#7067474)
See this thread on the Cap'n Proto mailing list for some idea of how well Python does on this benchmark:

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

Re:Updated benchmark: capnproto-rust vs. c++ by jparyani on Wednesday January 15, 2014 @11:54PM (#7068150)
Author of pycapnp here. For those too lazy to click through, pycapnp is tremendously slower than C++/Rust. The equivalent benchmarks take about 20-50x as long.

What's more interesting to me is comparing it to other Python serialization libraries. I've been meaning to update the benchmarks with some popular ones (msgpack, thrift, and the built-in json module are at the top of my list). If there's some interest, I'll go ahead and post it to HN when I'm done.

Re:Updated benchmark: capnproto-rust vs. c++ by westernmostcoy on Thursday January 16, 2014 @12:58AM (#7068299)
I'd certainly be interested!
Re:Updated benchmark: capnproto-rust vs. c++ by thinkpad20 on Thursday January 16, 2014 @12:08PM (#7070671)
Curious, how feasible would it be to simply call into existing C/C++ libraries from python instead of writing it in pure python?
Re:Updated benchmark: capnproto-rust vs. c++ by dwrensha on Thursday January 16, 2014 @12:37PM (#7070931)
Pycapnp is not pure Python. It wraps Cap'n Proto's C++ dynamic API. See http://kentonv.github.io/capnproto/otherlang.html#supporting... .
Re:Updated benchmark: capnproto-rust vs. c++ by steveklabnik on Wednesday January 15, 2014 @08:41PM (#7067504)
Thank you!
Re:Updated benchmark: capnproto-rust vs. c++ by cma on Wednesday January 15, 2014 @09:03PM (#7067594)
Keep in mind pycapnp is a wrapper of the c++ lib, so you aren't seeing all of the lower-level language gains in the comparison.
Re:Updated benchmark: capnproto-rust vs. c++ by pjmlp on Thursday January 16, 2014 @02:04AM (#7068425)
> I wonder if it'd be instructive to have a Ruby or Python benchmark too, just to show how much you gain by using a lower-level language.

It depends which implementation get compared.

If the standard implementations get used, that any strong typed language with ahead of time compilation to native code will win hands down.

Now if RubyMotion or PyPy are part of the benchmark, maybe they can achieve good enough performance.

Re:Updated benchmark: capnproto-rust vs. c++ by ksec on Wednesday January 15, 2014 @11:12PM (#7068045)
Love that. I am still hoping for a Ruby Implementation in Rust once Rust hit 1.0
Re:Updated benchmark: capnproto-rust vs. c++ by samnardoni on Thursday January 16, 2014 @03:19AM (#7068593)
Why? (Genuinely curious...)
Re:Updated benchmark: capnproto-rust vs. c++ by codygman on Thursday January 16, 2014 @02:00PM (#7071673)
I wish we could compare the old Haskell version to the C++ and Rust versions as well.
Re:Updated benchmark: capnproto-rust vs. c++ by dwrensha on Thursday January 16, 2014 @02:16PM (#7071810)
You're probably thinking of the original version of Cap'n Proto's schema parser, which was written in Haskell. The code generation step that it helped to handle is not a part of this benchmark.

As far as I know, nobody has written a Cap'n Proto serialization runtime for Haskell yet.

See http://kentonv.github.io/capnproto/otherlang.html .