4 ms·
Interestingly, the publicly available protobuf implementation is quite bad for only using std::string for string & repeated bytes fields, with std::string_view
by secondcoming 4y ago
Interestingly, the publicly available protobuf implementation is quite bad for only using std::string for string & repeated bytes fields, with std::string_view support only coming soon. I believe Google’s internal protobuf code support ABSL’s string_view equivalent.
- nerpderp82 4y agohttps://github.com/protocolbuffers/upb https://github.com/protocolbuffers/upb A Hardware Accelerator for Protocol Buffers https://dl.acm.org/doi/abs/10.1145/3466752.3480051 https://dl.acm.org/doi/abs/10.1145/3466752.3480051
- chubot 4y agoAh yeah, I think the historical issue is that Google doesn't use std::string internally for performance reasons. They have their own C++ string implementation, which protobuf uses internally, like all other code. And then when they open sourced it, I guess they left out that code. So the open source version is probably "de-optimized" a bit unfortunately.