]> Cypherpunks repositories - gostls13.git/commit
internal/chacha8rand: provide vector implementation for riscv64
authorMeng Zhuo <mengzhuo@iscas.ac.cn>
Fri, 3 Oct 2025 10:36:01 +0000 (18:36 +0800)
committerMeng Zhuo <mengzhuo@iscas.ac.cn>
Mon, 27 Oct 2025 01:34:48 +0000 (18:34 -0700)
commit6f04a92be3afa24560dd6149eefb991450746d72
treed2e2b471e83df5b8096368c490071ecb180b4e46
parent54e3adc53321b9352bd0ae2aebae597d31873124
internal/chacha8rand: provide vector implementation for riscv64

Provide a vector implementation of chacha8rand for riscv64,
which improves performance.

goos: linux
goarch: riscv64
pkg: internal/chacha8rand
cpu: Spacemit(R) X60
      │ /root/chacha8.rand.old.log │     /root/chacha8.rand.new.log      │
      │           sec/op           │   sec/op     vs base                │
Block                  1.640µ ± 0%   1.294µ ± 0%  -21.10% (p=0.000 n=10)

      │ /root/chacha8.rand.old.log │      /root/chacha8.rand.new.log      │
      │            B/s             │     B/s       vs base                │
Block                 148.9Mi ± 0%   188.6Mi ± 0%  +26.72% (p=0.000 n=10)

Change-Id: I1e04c5c44e5ce0c78814a6a48c5ab65e4d758937
Reviewed-on: https://go-review.googlesource.com/c/go/+/710035
Reviewed-by: Joel Sing <joel@sing.id.au>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/internal/chacha8rand/chacha8.go
src/internal/chacha8rand/chacha8_riscv64.s [new file with mode: 0644]
src/internal/chacha8rand/chacha8_stub.s