• Michael Munday's avatar
    math: optimize dim and remove s390x assembly implementation · b97688d1
    Michael Munday authored
    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: 's avatarRobert Griesemer <gri@golang.org>
    b97688d1
dim_s390x.s 1.96 KB