]> Cypherpunks repositories - gostls13.git/commit
math: optimize dim and remove s390x assembly implementation
authorMichael Munday <mike.munday@ibm.com>
Sun, 17 Sep 2017 16:20:35 +0000 (17:20 +0100)
committerRobert Griesemer <gri@golang.org>
Mon, 30 Oct 2017 19:05:51 +0000 (19:05 +0000)
commitb97688d112216c94791b60a846384561974399b4
tree6bb54403ab2caddc94c8123b0155cdb53eece911
parentbe08ddbfcd855fd13cf80497921ae53d2b64a7b1
math: optimize dim and remove s390x assembly implementation

By calculating dim directly, rather than calling max, we can simplify
the generated code significantly. The compiler now reports that dim
is easily inlineable, but it can't be inlined because there is still
an assembly stub for Dim.

Since dim is now very simple I no longer think it is worth having
assembly implementations of it. I have therefore removed the s390x
assembly. Removing the other assembly for Dim is #21913.

name  old time/op  new time/op  delta
Dim   4.29ns ± 0%  3.53ns ± 0%  -17.62%  (p=0.000 n=9+8)

Change-Id: Ic38a6b51603cbc661dcdb868ecf2b1947e9f399e
Reviewed-on: https://go-review.googlesource.com/64194
Run-TryBot: Michael Munday <mike.munday@ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/math/dim.go
src/math/dim_s390x.s
src/math/stubs_s390x.s