• Michael Munday's avatar
    reflect, runtime: optimize Value.Call on s390x and add benchmark · 3436f077
    Michael Munday authored
    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: default avatarBill O'Farrell <billotosyr@gmail.com>
    Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
    3436f077
all_test.go 145 KB