$ the-wire · showcase
LoongArch crypto gets SIMD, RISC-V bit tests slim down
By RepoJournal · Filed · About Go · Composed from the cited sources · methodology
golang/crypto landed Loong64 assembly for blake2b, chacha20, and argon2 in one push, while the compiler team continued filling in the LoongArch backend and rewrote power-of-two bit tests on riscv64.
blake2b: add loong64 SIMD implementation golang/crypto
An LSX SIMD implementation of BLAKE2b cuts Write128 and Sum128 by roughly 49% and Write1K by 52% on Loongson-3C6000 at 2.20GHz, so hashing throughput on LoongArch moves substantially closer to what other 64-bit targets already get.
argon2: add loong64 LSX implementation of blamka golang/crypto
Blamka, the core mixing function in argon2, gets an LSX implementation, dropping Argon2i at Time 3, 32MB, 1 thread from 123.36ms to 76.67ms on the same Loongson-3C6000. Password hashing is where argon2 users will notice it first.
chacha20: add loong64 SIMD implementation golang/crypto
ChaCha20 joins blake2b and argon2 with a Loong64 assembly implementation using LSX, which the commit says improves performance across all message sizes on LoongArch machines. Together the three land in x/crypto in the same session.
cmd/compile/internal/ssa: optimise bit tests on riscv64 golang/go
On riscv64, bit tests against power-of-two constants larger than 12 bits are rewritten as a right shift and a test against 1. The commit notes that an ANDI fitting in 12 bits is one instruction, up to 32 bits needs at least LUI+AND, and anything larger can need a memory load, so this path now takes one or two instructions for all power-of-two cases.
cmd/compile: implement clobberdead mode on loong64 golang/go
cmd/compile now implements clobberdead mode on loong64, for debugging only, and the runtime change that crashes the GC on a clobberdead pointer on that architecture depends on it. The remaining LoongArch work is cleanup: database/sql alloc checks extended to loong64 in TestRawBytesAllocs, a param register fix for [X]VMOVQ with a C_SAUTO operand, and GopherCon Japan 2027 added to the wiki.