runtime: memmove executes unaligned accesses on riscv64 #48248
Labels
arch-riscv
Issues solely affecting the riscv64 architecture.
compiler/runtime
Issues related to the Go compiler and/or runtime.
Performance
Milestone
The performance of memmove when copying more than ~16 bytes of unaligned data is very poor on the HiFive Unmatched. Looking at the code it only attempts to align the source operand before using word-sized load and store operations. This means that stores to the destination operand will be unaligned. On the HiFive Unmatched unaligned accesses result in a trap that is handled by the kernel and so performance is extremely poor (~10x slower than performing a byte-by-byte copy).
Benchmarks:
The text was updated successfully, but these errors were encountered: