-
Notifications
You must be signed in to change notification settings - Fork 18k
crypto/hmac: allocate hmac struct on the stack #62088
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
This PR (HEAD: f9250ae) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/520269. Important tips:
|
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/520269. |
Message from Mateusz Poliwczak: Patch Set 1: Run-TryBot+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/520269. |
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/520269. |
Message from Gopher Robot: Patch Set 1: TryBot-Result+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/520269. |
Message from Mateusz Poliwczak: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/520269. |
goos: linux goarch: amd64 pkg: crypto/hmac cpu: Intel(R) Core(TM) i5-4460 CPU @ 3.20GHz │ before │ after │ │ sec/op │ sec/op vs base │ HMACSHA256_1K-4 3.302µ ± 1% 3.296µ ± 1% ~ (p=0.740 n=25) HMACSHA256_32-4 611.9n ± 3% 613.5n ± 2% ~ (p=0.450 n=25) NewWriteSum-4 3.432µ ± 27% 2.513µ ± 18% -26.78% (p=0.011 n=25) geomean 1.907µ 1.719µ -9.84% │ before │ after │ │ B/s │ B/s vs base │ HMACSHA256_1K-4 295.8Mi ± 1% 296.3Mi ± 1% ~ (p=0.740 n=25) HMACSHA256_32-4 49.87Mi ± 3% 49.74Mi ± 2% ~ (p=0.461 n=25) NewWriteSum-4 8.888Mi ± 38% 12.140Mi ± 15% +36.59% (p=0.011 n=25) geomean 50.80Mi 56.35Mi +10.93% │ before │ after │ │ B/op │ B/op vs base │ HMACSHA256_1K-4 32.00 ± 0% 32.00 ± 0% ~ (p=1.000 n=25) ¹ HMACSHA256_32-4 32.00 ± 0% 32.00 ± 0% ~ (p=1.000 n=25) ¹ NewWriteSum-4 544.0 ± 0% 448.0 ± 0% -17.65% (p=0.000 n=25) geomean 82.28 77.12 -6.27% ¹ all samples are equal │ before │ after │ │ allocs/op │ allocs/op vs base │ HMACSHA256_1K-4 1.000 ± 0% 1.000 ± 0% ~ (p=1.000 n=25) ¹ HMACSHA256_32-4 1.000 ± 0% 1.000 ± 0% ~ (p=1.000 n=25) ¹ NewWriteSum-4 7.000 ± 0% 6.000 ± 0% -14.29% (p=0.000 n=25) geomean 1.913 1.817 -5.01% ¹ all samples are equal Change-Id: I66d9b16903a94956b6b228e12cd6958d03e2f789
f9250ae
to
afed4b9
Compare
This PR (HEAD: afed4b9) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/520269. Important tips:
|
Message from Mateusz Poliwczak: Patch Set 2: Commit-Queue+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/520269. |
Message from Go LUCI: Patch Set 2: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2024-02-19T18:55:06Z","revision":"c6fdd64c1328bc0de7c013c88ca156a59d6fb20a"} Please don’t reply on this GitHub thread. Visit golang.org/cl/520269. |
Message from Mateusz Poliwczak: Patch Set 2: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/520269. |
Message from Go LUCI: Patch Set 2: This CL has passed the run Please don’t reply on this GitHub thread. Visit golang.org/cl/520269. |
Message from Go LUCI: Patch Set 2: LUCI-TryBot-Result+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/520269. |
goos: linux
goarch: amd64
pkg: crypto/hmac
cpu: Intel(R) Core(TM) i5-4460 CPU @ 3.20GHz
│ before │ after │
│ sec/op │ sec/op vs base │
HMACSHA256_1K-4 3.302µ ± 1% 3.296µ ± 1% ~ (p=0.740 n=25)
HMACSHA256_32-4 611.9n ± 3% 613.5n ± 2% ~ (p=0.450 n=25)
NewWriteSum-4 3.432µ ± 27% 2.513µ ± 18% -26.78% (p=0.011 n=25)
geomean 1.907µ 1.719µ -9.84%
HMACSHA256_1K-4 295.8Mi ± 1% 296.3Mi ± 1% ~ (p=0.740 n=25)
HMACSHA256_32-4 49.87Mi ± 3% 49.74Mi ± 2% ~ (p=0.461 n=25)
NewWriteSum-4 8.888Mi ± 38% 12.140Mi ± 15% +36.59% (p=0.011 n=25)
geomean 50.80Mi 56.35Mi +10.93%
HMACSHA256_1K-4 32.00 ± 0% 32.00 ± 0% ~ (p=1.000 n=25) ¹
HMACSHA256_32-4 32.00 ± 0% 32.00 ± 0% ~ (p=1.000 n=25) ¹
NewWriteSum-4 544.0 ± 0% 448.0 ± 0% -17.65% (p=0.000 n=25)
geomean 82.28 77.12 -6.27%
¹ all samples are equal
HMACSHA256_1K-4 1.000 ± 0% 1.000 ± 0% ~ (p=1.000 n=25) ¹
HMACSHA256_32-4 1.000 ± 0% 1.000 ± 0% ~ (p=1.000 n=25) ¹
NewWriteSum-4 7.000 ± 0% 6.000 ± 0% -14.29% (p=0.000 n=25)
geomean 1.913 1.817 -5.01%
¹ all samples are equal