1
0
mirror of https://github.com/golang/go synced 2024-11-26 08:27:56 -07:00
go/src/math
Meng Zhuo 119d76d98e math/bits: folded reverse tables by using const string
linux/mips64le

name            old time/op  new time/op  delta
Reverse         2.31ns ± 1%  2.27ns ± 1%  -1.53%  (p=0.001 n=10+10)
Reverse8        0.65ns ± 1%  0.65ns ± 1%  -1.19%  (p=0.000 n=9+10)
Reverse16       1.15ns ± 2%  1.14ns ± 2%    ~     (p=0.062 n=9+10)
Reverse32       1.96ns ± 1%  1.94ns ± 1%  -1.16%  (p=0.000 n=10+9)
Reverse64       2.29ns ± 1%  2.26ns ± 0%  -0.94%  (p=0.000 n=9+9)
ReverseBytes    0.66ns ± 3%  0.65ns ± 1%  -1.58%  (p=0.006 n=9+10)
ReverseBytes16  0.66ns ± 2%  0.65ns ± 1%  -2.05%  (p=0.000 n=10+9)
ReverseBytes32  0.41ns ± 1%  0.40ns ± 0%  -1.68%  (p=0.000 n=10+10)
ReverseBytes64  0.66ns ± 1%  0.65ns ± 1%  -1.50%  (p=0.000 n=10+9)

cpu=1 benchtime=100ms count=100

name            old time/op  new time/op  delta
Reverse         28.0ns ± 3%  27.7ns ± 3%   -0.80%  (p=0.000 n=100+98)
Reverse8        2.24ns ± 1%  2.24ns ± 1%     ~     (p=0.142 n=98+100)
Reverse16       4.07ns ± 3%  4.05ns ± 3%   -0.66%  (p=0.000 n=99+99)
Reverse32       11.3ns ± 0%  11.3ns ± 0%     ~     (p=0.283 n=94+97)
Reverse64       12.6ns ± 0%  12.6ns ± 0%   +0.60%  (p=0.000 n=100+98)
ReverseBytes    5.25ns ± 1%  5.24ns ± 1%   -0.18%  (p=0.000 n=100+100)
ReverseBytes16  2.00ns ± 0%  2.21ns ± 3%  +10.07%  (p=0.000 n=88+100)
ReverseBytes32  4.08ns ± 2%  4.13ns ± 2%   +1.39%  (p=0.000 n=99+99)
ReverseBytes64  5.48ns ± 1%  5.45ns ± 1%   -0.50%  (p=0.000 n=98+99)

Update #43403

Change-Id: I7e7e00bb17608739d9f6b927c6dfef2580493a0e
Reviewed-on: https://go-review.googlesource.com/c/go/+/280645
Trust: Meng Zhuo <mzh@golangcn.org>
Trust: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
2021-03-17 03:18:12 +00:00
..
big math/big: add shrVU and shlVU benchmarks 2021-03-07 23:02:35 +00:00
bits math/bits: folded reverse tables by using const string 2021-03-17 03:18:12 +00:00
cmplx all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
rand all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
abs.go
acos_s390x.s
acosh_s390x.s math: use new mnemonics for 'rotate then insert' on s390x 2019-04-16 15:34:41 +00:00
acosh.go math: Remove redundant local variable Ln2 2020-09-19 09:09:52 +00:00
all_test.go cmd/compile: optimize single-precision floating point square root 2021-03-02 06:38:07 +00:00
arith_s390x_test.go
arith_s390x.go math: simplify hasVX checking on s390x 2020-04-27 20:06:57 +00:00
asin_s390x.s
asin.go
asinh_s390x.s math: use new mnemonics for 'rotate then insert' on s390x 2019-04-16 15:34:41 +00:00
asinh.go
atan2_s390x.s math: correct Atan2(±y,+∞) = ±0 on s390x 2020-03-25 04:06:34 +00:00
atan2.go
atan_s390x.s math: use new mnemonics for 'rotate then insert' on s390x 2019-04-16 15:34:41 +00:00
atan.go
atanh_s390x.s math: use new mnemonics for 'rotate then insert' on s390x 2019-04-16 15:34:41 +00:00
atanh.go
bits.go
cbrt_s390x.s math: use new mnemonics for 'rotate then insert' on s390x 2019-04-16 15:34:41 +00:00
cbrt.go
const.go
copysign.go
cosh_s390x.s math: use new mnemonics for 'rotate then insert' on s390x 2019-04-16 15:34:41 +00:00
dim_amd64.s
dim_arm64.s
dim_riscv64.s math: implement Min/Max in riscv64 assembly 2020-05-04 17:29:13 +00:00
dim_s390x.s
dim.go
erf_s390x.s math: use new mnemonics for 'rotate then insert' on s390x 2019-04-16 15:34:41 +00:00
erf.go
erfc_s390x.s math: use new mnemonics for 'rotate then insert' on s390x 2019-04-16 15:34:41 +00:00
erfinv.go
example_test.go math: add function examples. 2020-05-02 20:22:19 +00:00
exp_amd64.s math: fix dead link to springerlink (now link.springer) 2020-05-29 14:33:50 +00:00
exp_arm64.s
exp_asm.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
exp_s390x.s math: use new mnemonics for 'rotate then insert' on s390x 2019-04-16 15:34:41 +00:00
exp.go
expm1_s390x.s math: use new mnemonics for 'rotate then insert' on s390x 2019-04-16 15:34:41 +00:00
expm1.go
export_s390x_test.go
export_test.go
floor_386.s
floor_amd64.s
floor_arm64.s
floor_ppc64x.s
floor_s390x.s
floor_wasm.s
floor.go
fma.go math, cmd/compile: rename Fma to FMA 2019-11-07 14:51:06 +00:00
frexp.go
gamma.go
huge_test.go all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
hypot_386.s
hypot_amd64.s
hypot.go
j0.go all: s/cancelation/cancellation/ 2019-04-16 20:27:15 +00:00
j1.go all: s/cancelation/cancellation/ 2019-04-16 20:27:15 +00:00
jn.go
ldexp.go
lgamma.go
log1p_s390x.s math: use new mnemonics for 'rotate then insert' on s390x 2019-04-16 15:34:41 +00:00
log1p.go math: simplify the code 2020-08-15 02:20:42 +00:00
log10_s390x.s math: use new mnemonics for 'rotate then insert' on s390x 2019-04-16 15:34:41 +00:00
log10.go
log_amd64.s
log_s390x.s math: use new mnemonics for 'rotate then insert' on s390x 2019-04-16 15:34:41 +00:00
log.go
logb.go
mod.go
modf_arm64.s
modf_ppc64x.s
modf.go
nextafter.go
pow10.go
pow_s390x.s math: use new mnemonics for 'rotate then insert' on s390x 2019-04-16 15:34:41 +00:00
pow.go
remainder.go
signbit.go
sin_s390x.s
sin.go
sincos.go
sinh_s390x.s math: use new mnemonics for 'rotate then insert' on s390x 2019-04-16 15:34:41 +00:00
sinh.go
sqrt_386.s
sqrt_amd64.s
sqrt_arm64.s
sqrt_arm.s
sqrt_mipsx.s
sqrt_ppc64x.s
sqrt_riscv64.s math: implement Sqrt in assembly for riscv64 2020-02-25 16:43:26 +00:00
sqrt_s390x.s
sqrt_wasm.s
sqrt.go math: fix typo in sqrt.go code comment 2021-01-27 00:15:06 +00:00
stubs_386.s math: remove most 387 implementations 2021-02-19 00:41:09 +00:00
stubs_amd64.s math: consolidate assembly stub implementations 2019-04-23 14:50:16 +00:00
stubs_arm64.s math: consolidate assembly stub implementations 2019-04-23 14:50:16 +00:00
stubs_arm.s math: consolidate assembly stub implementations 2019-04-23 14:50:16 +00:00
stubs_mips64x.s math: consolidate assembly stub implementations 2019-04-23 14:50:16 +00:00
stubs_mipsx.s math: consolidate assembly stub implementations 2019-04-23 14:50:16 +00:00
stubs_ppc64x.s math: consolidate assembly stub implementations 2019-04-23 14:50:16 +00:00
stubs_riscv64.s math: implement Min/Max in riscv64 assembly 2020-05-04 17:29:13 +00:00
stubs_s390x.s math: simplify hasVX checking on s390x 2020-04-27 20:06:57 +00:00
stubs_wasm.s math: consolidate assembly stub implementations 2019-04-23 14:50:16 +00:00
tan_s390x.s
tan.go
tanh_s390x.s math: use new mnemonics for 'rotate then insert' on s390x 2019-04-16 15:34:41 +00:00
tanh.go
trig_reduce.go math/cmplx: implement Payne-Hanek range reduction 2020-03-14 04:12:41 +00:00
unsafe.go