protobuf-go/internal/encoding/json
Herbie Ong 670d808a6d internal/encoding/json: improve allocation of Value for JSON strings
Substitute interface Value.value field with per type field boo and str
instead.

name      old time/op    new time/op    delta
String-4     286ns ± 0%     254ns ± 0%   ~     (p=1.000 n=1+1)
Bool-4       209ns ± 0%     211ns ± 0%   ~     (p=1.000 n=1+1)

name      old alloc/op   new alloc/op   delta
String-4      192B ± 0%      176B ± 0%   ~     (p=1.000 n=1+1)
Bool-4       0.00B          0.00B        ~     (all equal)

name      old allocs/op  new allocs/op  delta
String-4      4.00 ± 0%      3.00 ± 0%   ~     (p=1.000 n=1+1)
Bool-4        0.00           0.00        ~     (all equal)

Change-Id: Ib0167d22e60d63c221c303b79c75b9e96d432fe7
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/170277
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
2019-04-01 20:47:36 +00:00
..
bench_test.go internal/encoding/json: improve allocation of Value for JSON strings 2019-04-01 20:47:36 +00:00
decode_test.go encoding/jsonpb: add support for basic unmarshaling 2019-03-15 18:53:18 +00:00
decode.go internal/encoding/json: improve allocation of Value for JSON strings 2019-04-01 20:47:36 +00:00
encode_test.go internal/encoding/json: rewrite to a token-based encoder and decoder 2019-03-11 21:53:21 +00:00
encode.go internal/encoding/json: rewrite to a token-based encoder and decoder 2019-03-11 21:53:21 +00:00
number.go internal/encoding/json: improve decoding of JSON numbers for floats 2019-03-23 22:02:55 +00:00
string.go internal/encoding/json: rewrite to a token-based encoder and decoder 2019-03-11 21:53:21 +00:00
types.go encoding/jsonpb: add support for basic unmarshaling 2019-03-15 18:53:18 +00:00