diff options
| author | Ilya Tocar <ilya.tocar@intel.com> | 2018-05-07 16:18:11 -0500 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2018-05-07 22:15:20 +0000 |
| commit | 406886b51f88d29f771dea395aecda652ebbe8de (patch) | |
| tree | 7de35a40f3c4af3885098881b41d26cde0d81ef1 /src/encoding/binary | |
| parent | b1df8d6ffa2c4c5be567934bd44432fff8f3c4a7 (diff) | |
| download | go-406886b51f88d29f771dea395aecda652ebbe8de.tar.xz | |
net: make IPString benchmarks more representative.
We were spending more time in duffcopy than in the String method.
Avoid creating a copy of test struct to make benchmark measure performance of
String() itself.
IPString/IPv4-8 113ns ± 0% 57ns ± 1% -49.83% (p=0.000 n=8+10)
IPString/IPv6-8 972ns ± 1% 915ns ± 1% -5.88% (p=0.000 n=9+10)
Change-Id: I5ceff2caa1b8288c43f0cf6c6b3809ca523af1fa
Reviewed-on: https://go-review.googlesource.com/111881
Run-TryBot: Ilya Tocar <ilya.tocar@intel.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/encoding/binary')
0 files changed, 0 insertions, 0 deletions
