]> Cypherpunks repositories - gostls13.git/commit
reflect, runtime: optimize Value.Call on s390x and add benchmark
authorMichael Munday <munday@ca.ibm.com>
Tue, 30 Aug 2016 19:25:28 +0000 (15:25 -0400)
committerMichael Munday <munday@ca.ibm.com>
Tue, 27 Sep 2016 16:00:19 +0000 (16:00 +0000)
commit3436f0776f4f373b5ba1aacf9f66689c833168b0
tree2862d3d041d4691df184c63a86e46d2b8fe56126
parent6c43c0c2fdc866bf6d85a4689ad42c42b9c527dd
reflect, runtime: optimize Value.Call on s390x and add benchmark

Use an MVC loop to copy arguments in runtime.call* rather than copying
bytes individually.

I've added the benchmark CallArgCopy to test the speed of Value.Call
for various argument sizes.

name                    old speed      new speed       delta
CallArgCopy/size=128     439MB/s ± 1%    582MB/s ± 1%   +32.41%  (p=0.000 n=10+10)
CallArgCopy/size=256     695MB/s ± 1%   1172MB/s ± 1%   +68.67%  (p=0.000 n=10+10)
CallArgCopy/size=1024    573MB/s ± 8%   4175MB/s ± 2%  +628.11%  (p=0.000 n=10+10)
CallArgCopy/size=4096   1.46GB/s ± 2%  10.19GB/s ± 1%  +600.52%  (p=0.000 n=10+10)
CallArgCopy/size=65536  1.51GB/s ± 0%  12.30GB/s ± 1%  +716.30%   (p=0.000 n=9+10)

Change-Id: I87dae4809330e7964f6cb4a9e40e5b3254dd519d
Reviewed-on: https://go-review.googlesource.com/28096
Run-TryBot: Michael Munday <munday@ca.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bill O'Farrell <billotosyr@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/reflect/all_test.go
src/runtime/asm_s390x.s