Cap'n'Proto: infinitely faster than Protobuf

by jackhalfordon 2/26/24, 8:46 PMwith 14 comments
by gnabgibon 2/27/24, 4:09 AM

Failing both the "misleading or clickbait" and the "please use original title" guidelines[0]. The article admits the image-stamp-ruse in the second paragraph:

This benchmark is, of course, unfair. It is only measuring the time to encode and decode a message in memory. Cap’n Proto gets a perfect score because there is no encoding/ decoding step.

Title: "Cap'n Proto: Introduction" H1: "Introduction"

Submitted many times 2016[1][2][3], 2018[4], 2020[5][6], 2021[7], 2022[8][9], 2023[10][11]

[0]: https://news.ycombinator.com/newsguidelines.html [1]: https://news.ycombinator.com/item?id=10825233 [2]: https://news.ycombinator.com/item?id=11229153 [3]: https://news.ycombinator.com/item?id=12471266 [4]: https://news.ycombinator.com/item?id=16397346 [5]: https://news.ycombinator.com/item?id=23924978 [6]: https://news.ycombinator.com/item?id=24065123 [7]: https://news.ycombinator.com/item?id=27061046 [8]: https://news.ycombinator.com/item?id=31189502 [9]: https://news.ycombinator.com/item?id=32468581 [10]: https://news.ycombinator.com/item?id=35128998 [11]: https://news.ycombinator.com/item?id=36913680

by gvkhnaon 2/27/24, 5:07 AM

To be fair protobufs are not purely focused on speed. And what speed exactly? Speed to parse, read, transfer?

Flatbuffers are purely fast read/write by storing buffers that can be mmap’d right into memory. At the cost of some size bloat (slower to transfer over the wire).

Protobufs are a mix of speed but also size over the wire being reduced which does reduce speed of parsing but increases speed transferring over the wire.

I think capnproto is a fantastic project, but considering google is built on top of grpc/protobufs, they will be around for effectively ever which gives it a lot of reliability in my book.

by moribvndvson 2/27/24, 5:25 AM

I had a shitty manager 20 years ago that constantly used “infinitely” literally and unironically (and also without qualification or very “gracious” caveats in his favor), thanks for the PTSD!

by commandersakion 2/27/24, 2:08 AM

In my testing I’ve found protobuf to be a bit faster.

by elromulouson 2/27/24, 2:06 AM

Happy to see capnproto on the front page!

Fyi - kentonv, its creater, is on here and is usually super responsive.

by bb88on 2/27/24, 4:31 AM

This has been around since 2013. It's good, but it's not new.