]> Cypherpunks repositories - gostls13.git/commit
[dev.regabi] go/constant: optimize BitLen
authorMatthew Dempsky <mdempsky@google.com>
Tue, 17 Nov 2020 20:53:34 +0000 (12:53 -0800)
committerMatthew Dempsky <mdempsky@google.com>
Tue, 24 Nov 2020 19:17:41 +0000 (19:17 +0000)
commit1abb12fc97d87ea67ce87a04ad6500bdfe1dbb7d
treec47e94c2b0db0c0e00dc91b47320a633d809002e
parent228b732ad988a457c0f3d42f6aeb0fe338a5c4ec
[dev.regabi] go/constant: optimize BitLen

Avoids an unnecessary heap allocation when computing the bit length of
int64 values.

Change-Id: I69dfc510e461daf3e83b0b7b6c0707f6526a32d0
Reviewed-on: https://go-review.googlesource.com/c/go/+/272646
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/go/constant/value.go
src/go/constant/value_test.go