Protobuf Performance
The following benchmark test results were produced on a workstation utilizing an Intel® Xeon® Processor E5-2630 with 32GB of RAM.
This table contains the results of three separate languages:
- C++ - For C++, there are three parsing methods:
- new - This is for using a new operator for creating a message instance.
- new arena - This is for using arena for creating a new message instance.
- reuse - This is for reusing the same message instance for parsing.
- Java - For Java, there are three parsing/serialization methods:
- byte[] - This is for parsing from a Byte Array.
- ByteString - This is for parsing from a com.google.protobuf.ByteString.
- InputStream - This is for parsing from an InputStream.
- Python - For Python, there are three types of Python protobuf for testing:
- C++-generated-code - This is for using C++ generated code of the proto file as a dynamic linked library.
- C++-reflection - This is for using C++ reflection, for which there's no generated code, but still using C++ protobuf library as a dynamic linked library.
- pure-Python - This is for the pure version of Python, which does not link with any C++ protobuf library.
Parsing performance
Serialization performance
* The cpp performance can be improved by using tcmalloc, please follow the (instruction)[https://github.com/protocolbuffers/protobuf/blob/master/benchmarks/README.md] to link with tcmalloc to get the faster result.