mirror of
https://github.com/protocolbuffers/protobuf-go.git
synced 2025-01-01 11:58:21 +00:00
44e4150b30
For simplicity, IsValid was implemented in terms of regular expressions, which are useful for verifying a string according to a strict grammar, but performs poorly. Implement the check in terms of hand-written code, which provides a 20x improvement to validate the name "google.protobuf.Any". name old time/op new time/op delta FullNameIsValid-8 683ns ± 2% 35ns ± 1% -94.86% (p=0.000 n=10+10) Change-Id: I980403befca0b72cea22acd274064a46cb02644b Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/238002 Reviewed-by: Damien Neil <dneil@google.com> |
||
---|---|---|
.. | ||
methods.go | ||
proto_test.go | ||
proto.go | ||
source.go | ||
type.go | ||
value_pure.go | ||
value_test.go | ||
value_union.go | ||
value_unsafe.go | ||
value.go |