aboutsummaryrefslogtreecommitdiff
path: root/src/bytes/buffer.go
diff options
context:
space:
mode:
authorMichael Munday <mndygolang+git@gmail.com>2025-08-26 21:17:36 +0100
committerGopher Robot <gobot@golang.org>2025-11-14 10:59:56 -0800
commit0a569528ea355099af864f7612c3fa1973df30e4 (patch)
tree189f828573801d88d072ebd988ae1d553d2a8afa /src/bytes/buffer.go
parent1e5e6663e958dcc9579fb38ffcd8a1999d75128d (diff)
downloadgo-0a569528ea355099af864f7612c3fa1973df30e4.tar.xz
cmd/compile: optimize comparisons with single bit difference
Optimize comparisons with constants that only differ by 1 bit (i.e. a power of 2). For example: x == 4 || x == 6 -> x|2 == 6 x != 1 && x != 5 -> x|4 != 5 Change-Id: Ic61719e5118446d21cf15652d9da22f7d95b2a15 Reviewed-on: https://go-review.googlesource.com/c/go/+/719420 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Junyang Shao <shaojunyang@google.com> Auto-Submit: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com>
Diffstat (limited to 'src/bytes/buffer.go')
0 files changed, 0 insertions, 0 deletions