]> Cypherpunks.ru repositories - gostls13.git/commit
[dev.boringcrypto] crypto/internal/boring: avoid allocation in big.Int conversion
authorRuss Cox <rsc@golang.org>
Wed, 27 Apr 2022 13:02:53 +0000 (09:02 -0400)
committerRuss Cox <rsc@golang.org>
Fri, 29 Apr 2022 14:23:26 +0000 (14:23 +0000)
commit3cb10d14b7671ceee374d90ae0d4c3d024838f8a
tree13ff63b42da344a776ca02a08085316d42f9a3ba
parent509776be5dca8d7ca47cc6ef2e4fc452eb99dc96
[dev.boringcrypto] crypto/internal/boring: avoid allocation in big.Int conversion

The conversion via byte slices is inefficient; we can convert via word slices
and avoid the copy entirely.

For #51940.

Change-Id: I06f747e0acffffae427d9706d43bdacf146c027d
Reviewed-on: https://go-review.googlesource.com/c/go/+/395875
Reviewed-by: Roland Shoemaker <roland@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/crypto/internal/boring/boring.go
src/crypto/internal/boring/goboringcrypto.h
src/crypto/internal/boring/syso/goboringcrypto_linux_amd64.syso