Are you a developer or a data analyst? Share your thoughts about your coding tools in our short survey and get a chance to win prizes! Learn more →
C++ protobuf-runtime Projects
-
Project mention: I wasted weeks hand optimizing assembly because I benchmarked on random data | news.ycombinator.com | 2025-07-24
(((uint32_t)clz + 7) * 9) >> 6
3. Hand roll a jump table taking advantage of arm's fixed instruction width to calculate the jump target with a shift.
https://github.com/protocolbuffers/protobuf/commit/b039dfe26...
This results in one branch for 1 byte varints, plus one additional branch for any larger size, and the branch predictor does not have to track a varying trip count through a loop. This approach resulted in a 2.64% speedup for overall encoding (which includes a lot more than just varints) on mid sized arm cores.
I think it's very difficult to beat a single comparison and branch for the 1 byte case for actual encoding forwards or backwards, unless you know there's going to be long runs of one-byte values.
-
JetBrains
Tell us how you use coding tools. You may win a prize! Are you a developer or a data analyst? Share your thoughts about your coding tools in our short survey and get a chance to win prizes!
C++ protobuf-runtime discussion
C++ protobuf-runtime related posts
-
The provenance memory model for C
-
The Big TDD Misunderstanding (2022)
-
Μpb: Small, Fast C Protobufs
-
Understanding Protocol Buffers: A Fast Alternative to JSON
-
Part 3: Compiling the Protos and Setting up the gRPC server
-
A protoc compiler plugin that generates useful extension code for Kotlin/JVM
-
Show HN: Protobuf Editions now available in v27.0
-
A note from our sponsor - JetBrains
surveys.jetbrains.com | 1 Sep 2025
Index
# | Project | Stars |
---|---|---|
1 | Protobuf | 68,919 |