aboutsummaryrefslogtreecommitdiff
path: root/src/os/exec/exec_test.go
diff options
context:
space:
mode:
authorAlbert Nigmatzianov <albertnigma@gmail.com>2017-05-22 21:39:38 +0200
committerBrad Fitzpatrick <bradfitz@golang.org>2017-05-22 21:59:34 +0000
commit4cf19fb5a73a33f838efe21b3baa14167469ac83 (patch)
tree755f51a56263f401d2e7c28868d39a9f33241b95 /src/os/exec/exec_test.go
parentd433de6e86ce08e1b33e5d604080d3f504529006 (diff)
downloadgo-4cf19fb5a73a33f838efe21b3baa14167469ac83.tar.xz
log: Prevent getting time if it's unnecessary
Small performance gain: name old time/op new time/op delta Itoa-4 95.4ns ± 4% 95.6ns ± 3% ~ (p=0.256 n=45+46) Println-4 480ns ± 4% 476ns ± 5% -0.87% (p=0.003 n=45+45) PrintlnNoFlags-4 316ns ± 3% 299ns ± 4% -5.38% (p=0.000 n=42+44) name old alloc/op new alloc/op delta Itoa-4 0.00B 0.00B ~ (all equal) Println-4 21.0B ± 0% 21.0B ± 0% ~ (all equal) PrintlnNoFlags-4 21.0B ± 0% 21.0B ± 0% ~ (all equal) name old allocs/op new allocs/op delta Itoa-4 0.00 0.00 ~ (all equal) Println-4 2.00 ± 0% 2.00 ± 0% ~ (all equal) PrintlnNoFlags-4 2.00 ± 0% 2.00 ± 0% ~ (all equal) Change-Id: Idcd03609a5a437a69ffa7004a673bf0b8d22e7ad Reviewed-on: https://go-review.googlesource.com/38056 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/os/exec/exec_test.go')
0 files changed, 0 insertions, 0 deletions