Nicolas Hillegeer 39bbf13930 proto: CSE ProtoReflect() and TypeDescriptor() in proto.HasExtension
No need to call them multiple times, no matter how cheap they are. Mild
improvements, this CL is 01-cse-hasextension:

    $ perflock -socket=@perflock -shared -cores 12 go test -tags=protolegacy -test.bench=BenchmarkExtension -test.benchmem -test.run=^# -test.count 10 internal/benchmarks/micro/micro_test.go

    goarch: amd64
    cpu: AMD Ryzen Threadripper PRO 3995WX 64-Cores
                          │ 00-cse-messageinfo │        01-cse-hasextension         │
                          │       sec/op       │   sec/op     vs base               │
    Extension/Has/None-12         103.30n ± 3%   96.73n ± 1%  -6.36% (p=0.000 n=10)
    Extension/Has/Set-12           113.0n ± 3%   107.1n ± 1%  -5.22% (p=0.000 n=10)
    Extension/Get/None-12          182.7n ± 2%   176.3n ± 2%  -3.48% (p=0.000 n=10)
    Extension/Get/Set-12           140.1n ± 2%   138.0n ± 1%  -1.46% (p=0.024 n=10)
    Extension/Set-12               218.6n ± 2%   219.5n ± 1%       ~ (p=0.172 n=10)
    geomean                        145.6n        140.8n       -3.25%

Change-Id: Ide1a0c0fe4e562ed24f88dc829249fca0f052d48
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/576315
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Nicolas Hillegeer <aktau@google.com>
Reviewed-by: Michael Stapelberg <stapelberg@google.com>
2024-04-08 13:07:34 +00:00
..
2022-05-19 09:32:38 +00:00
2023-09-05 14:55:28 +00:00
2023-09-05 14:55:28 +00:00
2022-01-04 22:57:54 +00:00
2020-04-23 06:01:13 +00:00
2022-01-04 22:57:54 +00:00
2022-01-04 22:57:54 +00:00
2023-09-05 14:55:28 +00:00