]> Cypherpunks repositories - gostls13.git/commit
[dev.simd] internal/runtime/gc: add simd package based greentea kernels
authorJunyang Shao <shaojunyang@google.com>
Sun, 9 Mar 2025 17:19:48 +0000 (17:19 +0000)
committerJunyang Shao <shaojunyang@google.com>
Fri, 21 Nov 2025 21:14:21 +0000 (13:14 -0800)
commitda92168ec8cedf08603fd77929a4b9d7e3183275
tree528c7ac054f2a25155289e47b5d5429bc6478830
parent3fdd183aefe6a968e09b0e8f333be5043b86b070
[dev.simd] internal/runtime/gc: add simd package based greentea kernels

This CL adds a new generator to internal/runtime/gc/scan that generates expander
kernels in Go SIMD. This CL also includes a Go SIMD scan kernel and a
Go SIMD filter kernel.

This CL also includes the plumbing, it will use the Go SIMD kernels if
goexperiment.simd is on.

Benchmark results:
...
ScanSpanPacked/cache=tiny/pages=1/sizeclass=26/pct=80-88     354.8n ±  1%   272.4n ±  0%  -23.22% (p=0.002 n=6)
ScanSpanPacked/cache=tiny/pages=1/sizeclass=26/pct=90-88     375.7n ±  0%   287.1n ±  0%  -23.58% (p=0.002 n=6)
ScanSpanPacked/cache=tiny/pages=1/sizeclass=26/pct=100-88    450.0n ±  1%   327.4n ±  0%  -27.24% (p=0.002 n=6)
geomean                                                      246.5n         199.4n        -19.10%

Throughput +25%.

Change-Id: Ib85e01b7de18181db9e7b6026863209a993aa85f
Reviewed-on: https://go-review.googlesource.com/c/go/+/719520
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
19 files changed:
src/cmd/compile/internal/ssa/stmtlines_test.go
src/go/build/deps_test.go
src/internal/runtime/gc/scan/expand_amd64.s [deleted file]
src/internal/runtime/gc/scan/expand_amd64_test.go
src/internal/runtime/gc/scan/expand_simd_amd64_test.go [new file with mode: 0644]
src/internal/runtime/gc/scan/expand_test.go
src/internal/runtime/gc/scan/expanders_amd64.go [new file with mode: 0644]
src/internal/runtime/gc/scan/expanders_amd64.s [new file with mode: 0644]
src/internal/runtime/gc/scan/export_amd64_test.go [moved from src/internal/runtime/gc/scan/expand_amd64.go with 76% similarity]
src/internal/runtime/gc/scan/export_simd_amd64_test.go [new file with mode: 0644]
src/internal/runtime/gc/scan/mkasm.go
src/internal/runtime/gc/scan/mkexpanders.go [new file with mode: 0644]
src/internal/runtime/gc/scan/scan_amd64.go
src/internal/runtime/gc/scan/scan_amd64.s
src/internal/runtime/gc/scan/scan_amd64_test.go
src/internal/runtime/gc/scan/scan_generic.go
src/internal/runtime/gc/scan/scan_nosimd_amd64.go [new file with mode: 0644]
src/internal/runtime/gc/scan/scan_simd_amd64.go [new file with mode: 0644]
src/internal/runtime/gc/scan/scan_test.go