1
0
mirror of https://github.com/golang/go synced 2024-11-20 05:44:44 -07:00
go/src
Keith Randall 6c7cbf086c runtime: get rid of most uses of REP for copying/zeroing.
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
2014-04-01 12:51:02 -07:00
..
cmd runtime: get rid of most uses of REP for copying/zeroing. 2014-04-01 12:51:02 -07:00
lib9 lib9/utf: bring C environment up to Unicode 6.3.0 2014-02-25 17:49:32 -08:00
libbio lib9: enable on Plan 9 2014-02-13 20:06:41 +01:00
liblink runtime: get rid of most uses of REP for copying/zeroing. 2014-04-01 12:51:02 -07:00
libmach libmach: use different names for different Ureg types 2014-01-08 20:37:27 -05:00
pkg runtime: get rid of most uses of REP for copying/zeroing. 2014-04-01 12:51:02 -07:00
all.bash
all.bat
all.rc
clean.bash
clean.bat
clean.rc
make.bash cmd/go, cmd/cgo, make.bash: cross compiling with cgo enabled 2014-02-06 09:11:00 -08:00
make.bat
Make.dist
make.rc lib9: enable on Plan 9 2014-02-13 20:06:41 +01:00
race.bash
race.bat
run.bash run.bash: explain why we set GOMAXPROCS for runtime test 2014-03-06 13:16:14 +04:00
run.bat run.bash: explain why we set GOMAXPROCS for runtime test 2014-03-06 13:16:14 +04:00
run.rc run.bash: explain why we set GOMAXPROCS for runtime test 2014-03-06 13:16:14 +04:00
sudo.bash