]> Cypherpunks repositories - gostls13.git/commit
math: optimize ceil/floor functions on amd64
authorIlya Tocar <ilya.tocar@intel.com>
Mon, 14 Sep 2015 15:42:39 +0000 (18:42 +0300)
committerBrad Fitzpatrick <bradfitz@golang.org>
Sat, 3 Oct 2015 15:55:08 +0000 (15:55 +0000)
commit37cfb2e07e9e9e8b11f21ea462856aeb1f6ec0c0
tree29c52602253546a41b3c2c062789ab573844c366
parentacc90c53e8b5448afee8455ee7c4917af25c6bc9
math: optimize ceil/floor functions on amd64

Use SSE 4.1 rounding instruction to perform rounding
Results (haswell):

name      old time/op  new time/op  delta
Floor-48  2.71ns ± 0%  1.87ns ± 1%  -31.17%  (p=0.000 n=16+19)
Ceil-48   3.09ns ± 3%  2.16ns ± 0%  -30.16%  (p=0.000 n=19+12)

Change-Id: If63715879eed6530b1eb4fc96132d827f8f43909
Reviewed-on: https://go-review.googlesource.com/14561
Reviewed-by: Klaus Post <klauspost@gmail.com>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/internal/obj/x86/a.out.go
src/cmd/internal/obj/x86/anames.go
src/cmd/internal/obj/x86/asm6.go
src/math/floor_amd64.s
src/math/floor_asm.go [new file with mode: 0644]