Hi,
I've been looking into optimizing string/byte operations on ARM64 and came across
the MATCH instruction introduced in SVE2. This instruction can efficiently find
matching bytes in vectors, which could potentially benefit operations like:
- bytes.IndexByte / strings.IndexByte
- bytes.Count
- bytes.Contains
- Other byte-scanning operations in internal/bytealg
Current status:
- The
golang.org/x/sys/cpu package already detects HasSVE2
- However, the ARM64 assembler (cmd/internal/obj/arm64) doesn't include any
SVE/SVE2 instructions
Questions:
1. Are there any plans to add SVE2 instruction support to the assembler?
2. If so, is this something that would be considered for the standard library's
bytealg implementations?
3. Are there any technical or strategic reasons for not pursuing SVE/SVE2 support?
I understand SVE/SVE2 adoption is still limited compared to NEON, but with newer
ARM processors (like AWS Graviton3+, Ampere Altra, Apple M-series) supporting it,
it might be worth considering for future optimization work.
Would appreciate any insights on whether this is on the roadmap or if there are
proposals I should be aware of.
Thanks,