Commit Graph

3 Commits

Author SHA1 Message Date
Damien Neil
cadb4ab3b1 internal/impl: refactor validation a bit
Return the size of the field read from the validator, permitting us to
avoid an extra parse when skipping over groups.

Return an UnmarshalOutput from the validator, since it already combines
two of the validator outputs: bytes read and initialization status.

Remove initialization status from the ValidationStatus enum, since it's
covered by the UnmarshalOutput.

Change-Id: I3e684c45d15aa1992d8dc3bde0f608880d34a94b
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/217763
Reviewed-by: Joe Tsai <joetsai@google.com>
2020-02-05 05:32:50 +00:00
Damien Neil
f25a6ca994 internal/benchmarks/micro: add validator microbenchmarks
Change-Id: Ice768d90e650bf51d619b8cd5f5d51e6b00c53b6
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/216623
Reviewed-by: Joe Tsai <joetsai@google.com>
2020-01-28 22:46:05 +00:00
Damien Neil
8729675da7 internal/benchmarks/micro: add a place for microbenchmarks
Add a place to put microbenchmarks used to justify performance-related changes.

Change-Id: I6e90a3500594b3f6297cee0b8e321a50d0a556ca
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/216480
Reviewed-by: Joe Tsai <joetsai@google.com>
2020-01-26 22:22:44 +00:00