-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.Performancearch-arm64compiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.
Milestone
Description
Go version
tip as of Nov 24, 2023
Reproducibility
- Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (go env
)?
not relevant
What did you do?
amd64 memequal starts by comparing pointers and returning true if they are true.
go/src/internal/bytealg/equal_amd64.s
Lines 14 to 17 in 0c7e5d3
CMPQ AX, BX | |
JNE neq | |
MOVQ $1, AX // return 1 | |
RET |
arm64 memequal is missing this optimization.
go/src/internal/bytealg/equal_arm64.s
Line 12 in 0c7e5d3
B memeqbody<>(SB) |
(Other architectures may also be missing it. I did not check.)
Initially reported as josharian/intern#3
What did you expect to see?
Fast string comparisons of identical strings (same string headers).
What did you see instead?
Comparing their contents on arm64.
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.Performancearch-arm64compiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.