]> Cypherpunks repositories - gostls13.git/commit
math: use Abs in Mod rather than if x < 0 { x = -x}
authorPlekhanov Maxim <kishtatix@gmail.com>
Wed, 20 Dec 2017 23:14:55 +0000 (02:14 +0300)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 4 Oct 2018 17:32:44 +0000 (17:32 +0000)
commit497d24178fdc321a037150656d51bec40f93e6d6
treef3cf16e720acd7ac0a084e6048f267cd6b139de2
parentf22c357a34521404c445dc2e848657ecbfa4ad5e
math: use Abs in Mod rather than if x < 0 { x = -x}

goos: linux
goarch: amd64
pkg: math

name  old time/op  new time/op  delta
Mod   64.7ns ± 2%  63.7ns ± 2%  -1.52%  (p=0.003 n=8+10)

Change-Id: I851bec0fd6c223dab73e4a680b7393d49e81a0e8
Reviewed-on: https://go-review.googlesource.com/c/85095
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/math/mod.go