mirror of
https://github.com/golang/go
synced 2024-11-20 05:44:44 -07:00
6c7cbf086c
REP MOVSQ and REP STOSQ have a really high startup overhead. Use a Duff's device to do the repetition instead. benchmark old ns/op new ns/op delta BenchmarkClearFat32 7.20 1.60 -77.78% BenchmarkCopyFat32 6.88 2.38 -65.41% BenchmarkClearFat64 7.15 3.20 -55.24% BenchmarkCopyFat64 6.88 3.44 -50.00% BenchmarkClearFat128 9.53 5.34 -43.97% BenchmarkCopyFat128 9.27 5.56 -40.02% BenchmarkClearFat256 13.8 9.53 -30.94% BenchmarkCopyFat256 13.5 10.3 -23.70% BenchmarkClearFat512 22.3 18.0 -19.28% BenchmarkCopyFat512 22.0 19.7 -10.45% BenchmarkCopyFat1024 36.5 38.4 +5.21% BenchmarkClearFat1024 35.1 35.0 -0.28% TODO: use for stack frame zeroing TODO: REP prefixes are still used for "reverse" copying when src/dst regions overlap. Might be worth fixing. LGTM=rsc R=golang-codereviews, rsc CC=golang-codereviews, r https://golang.org/cl/81370046 |
||
---|---|---|
.. | ||
cmd | ||
lib9 | ||
libbio | ||
liblink | ||
libmach | ||
pkg | ||
all.bash | ||
all.bat | ||
all.rc | ||
clean.bash | ||
clean.bat | ||
clean.rc | ||
make.bash | ||
make.bat | ||
Make.dist | ||
make.rc | ||
race.bash | ||
race.bat | ||
run.bash | ||
run.bat | ||
run.rc | ||
sudo.bash |