News for hackers. Stuff that matters.
Re:Parsing Protobuf at 2+GB/S: How I Learned to Love Tail Ca... by pjmlp on Sunday April 25, 2021 @02:03PM (#26934934)
I know, the point was that they don't care to improve the C++ version.
Re:Parsing Protobuf at 2+GB/S: How I Learned to Love Tail Ca... by haberman on Sunday April 25, 2021 @02:18PM (#26935110)
The C++ parser has been completely rewritten in the last few years to push the current code generation design to its limits. The biggest obstacle in the way of optimizing it further is legacy APIs, especially std::string for string fields, which forces tons of small heap allocations and frees and defeats the benefits of arena allocation.

Changing very widely used APIs is not easy, these things take time.

Re:Parsing Protobuf at 2+GB/S: How I Learned to Love Tail Ca... by pjmlp on Sunday April 25, 2021 @02:23PM (#26935165)
Interesting, thanks for the clarification, however why do libraries depend on what should be implementation details of generated code to start with?

Something that by good CI/CD practices shouldn't even be part of checked in code.

Re:Parsing Protobuf at 2+GB/S: How I Learned to Love Tail Ca... by haberman on Sunday April 25, 2021 @02:30PM (#26935229)
It's exposed in the API. When you access a string field in protobuf, say foo.my_str_field(), the return type is const std::string&. We have to have a real std::string internally to return a reference to it.
Re:Parsing Protobuf at 2+GB/S: How I Learned to Love Tail Ca... by pjmlp on Sunday April 25, 2021 @02:33PM (#26935256)
Thanks for the explanation.
Re:Parsing Protobuf at 2+GB/S: How I Learned to Love Tail Ca... by boulos on Sunday April 25, 2021 @02:14PM (#26935058)
haberman is part of the “they” here (he’s on the core protobuf team, does things like this).