Go support for Google's protocol buffers
Go to file
Herbie Ong a3369c5dc2 internal/encoding/text: replace use of regular expression in decoding
Improve performance by replacing use of regular expressions with direct
parsing code.

Compared to latest version:

name                                     old time/op    new time/op    delta
Text/Unmarshal/google_message1_proto2-4    21.8µs ± 5%    14.0µs ± 9%  -35.69%  (p=0.000 n=10+9)
Text/Unmarshal/google_message1_proto3-4    19.6µs ± 4%    13.8µs ±10%  -29.47%  (p=0.000 n=10+10)
Text/Unmarshal/google_message2-4           13.4ms ± 4%     4.9ms ± 4%  -63.44%  (p=0.000 n=10+10)
Text/Marshal/google_message1_proto2-4      13.8µs ± 2%    14.1µs ± 4%   +2.42%  (p=0.011 n=9+10)
Text/Marshal/google_message1_proto3-4      11.6µs ± 2%    11.8µs ± 8%     ~     (p=0.573 n=8+10)
Text/Marshal/google_message2-4             8.01ms ±48%    5.97ms ± 5%  -25.44%  (p=0.000 n=10+10)

name                                     old alloc/op   new alloc/op   delta
Text/Unmarshal/google_message1_proto2-4    13.0kB ± 0%    12.6kB ± 0%   -3.40%  (p=0.000 n=10+10)
Text/Unmarshal/google_message1_proto3-4    13.0kB ± 0%    12.5kB ± 0%   -3.50%  (p=0.000 n=10+10)
Text/Unmarshal/google_message2-4           5.67MB ± 0%    5.50MB ± 0%   -3.13%  (p=0.000 n=10+10)
Text/Marshal/google_message1_proto2-4      12.0kB ± 0%    12.1kB ± 0%   +0.02%  (p=0.000 n=10+10)
Text/Marshal/google_message1_proto3-4      11.7kB ± 0%    11.7kB ± 0%   +0.01%  (p=0.000 n=10+10)
Text/Marshal/google_message2-4             5.68MB ± 0%    5.68MB ± 0%   +0.01%  (p=0.000 n=10+10)

name                                     old allocs/op  new allocs/op  delta
Text/Unmarshal/google_message1_proto2-4       142 ± 0%       142 ± 0%     ~     (all equal)
Text/Unmarshal/google_message1_proto3-4       156 ± 0%       156 ± 0%     ~     (all equal)
Text/Unmarshal/google_message2-4            70.1k ± 0%     65.4k ± 0%   -6.76%  (p=0.000 n=10+10)
Text/Marshal/google_message1_proto2-4        91.0 ± 0%      91.0 ± 0%     ~     (all equal)
Text/Marshal/google_message1_proto3-4        80.0 ± 0%      80.0 ± 0%     ~     (all equal)
Text/Marshal/google_message2-4              36.4k ± 0%     36.4k ± 0%     ~     (all equal)

Change-Id: Ia5d3c16e9e33961aae03bac0d53fcfc5b1943d2a
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/173360
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
2019-07-23 22:08:16 +00:00
benchmarks benchmarks: move download_benchdata.bash into benchmarks/ dir 2019-07-09 22:36:27 +00:00
cmd cmd/protoc-gen-go: minor code changes to assist internal patches 2019-07-20 08:29:32 +00:00
compiler/protogen compiler/protogen: use protoreflect.SourcePath 2019-07-15 18:21:33 +00:00
encoding cmd/protoc-gen-go: update deprecation warning 2019-07-18 02:26:18 +00:00
internal internal/encoding/text: replace use of regular expression in decoding 2019-07-23 22:08:16 +00:00
proto proto: remove dependency on github.com/golang/protobuf 2019-07-15 22:26:29 +00:00
reflect reflect/protoregistry: add conflict override 2019-07-18 17:47:11 +00:00
runtime all: implement proto1 weak fields 2019-07-15 18:44:12 +00:00
testing/prototest all: implement proto1 weak fields 2019-07-15 18:44:12 +00:00
types cmd/protoc-gen-go: refactor logic to be more compartmentalized 2019-07-19 08:16:51 +00:00
.gitignore integration_test.go: move Go cache 2019-07-12 00:35:42 +00:00
.travis.yml .travis.yml: configure for OSX 2019-03-13 18:04:08 +00:00
AUTHORS
CONTRIBUTING.md
CONTRIBUTORS
go.mod all: update to github.com/golang/protobuf@b9f5089f 2019-07-18 00:01:40 +00:00
go.sum all: update to github.com/golang/protobuf@b9f5089f 2019-07-18 00:01:40 +00:00
integration_test.go all: implement proto1 weak fields 2019-07-15 18:44:12 +00:00
LICENSE
PATENTS
README.md
regenerate.bash
test.bash

Next Generation Go Protocol Buffers

WARNING: This repository is in active development. There are no guarantees about API stability. Breaking changes will occur until a stable release is made and announced.

This repository is for the development of the next major Go implementation of protocol buffers. This library makes breaking API changes relative to the existing Go protobuf library. Of particular note, this API aims to make protobuf reflection a first-class feature of the API and implements the protobuf ecosystem in terms of reflection.

Design Documents

List of relevant design documents:

Contributing

We appreciate community contributions. See CONTRIBUTING.md.

Reporting Issues

Issues regarding the new API can be filed at github.com/golang/protobuf. Please use a APIv2: prefix in the title to make it clear that the issue is regarding the new API work.