1
0
mirror of https://github.com/golang/go synced 2024-11-13 18:20:32 -07:00
go/src
Neven Sajko 964fe4b80f math/big: simplify shlVU_g and shrVU_g
Rewrote a few lines to be more idiomatic/less assembly-ish.

Benchmarked with `go test -bench Float -tags math_big_pure_go`:

name                  old time/op    new time/op    delta
FloatString/100-8        751ns ± 0%     746ns ± 1%  -0.71%  (p=0.000 n=10+10)
FloatString/1000-8      22.9µs ± 0%    22.9µs ± 0%    ~     (p=0.271 n=10+10)
FloatString/10000-8     1.89ms ± 0%    1.89ms ± 0%    ~     (p=0.481 n=10+10)
FloatString/100000-8     184ms ± 0%     184ms ± 0%    ~     (p=0.094 n=9+9)
FloatAdd/10-8           56.4ns ± 1%    56.5ns ± 0%    ~     (p=0.170 n=9+9)
FloatAdd/100-8          59.7ns ± 0%    59.3ns ± 0%  -0.70%  (p=0.000 n=8+9)
FloatAdd/1000-8          101ns ± 0%      99ns ± 0%  -1.89%  (p=0.000 n=8+8)
FloatAdd/10000-8         553ns ± 0%     536ns ± 0%  -3.00%  (p=0.000 n=9+10)
FloatAdd/100000-8       4.94µs ± 0%    4.74µs ± 0%  -3.94%  (p=0.000 n=9+10)
FloatSub/10-8           50.3ns ± 0%    50.5ns ± 0%  +0.52%  (p=0.000 n=8+8)
FloatSub/100-8          52.0ns ± 0%    52.2ns ± 1%  +0.46%  (p=0.012 n=8+10)
FloatSub/1000-8         77.9ns ± 0%    77.3ns ± 0%  -0.80%  (p=0.000 n=7+8)
FloatSub/10000-8         371ns ± 0%     362ns ± 0%  -2.67%  (p=0.000 n=10+10)
FloatSub/100000-8       3.20µs ± 0%    3.10µs ± 0%  -3.16%  (p=0.000 n=10+10)
ParseFloatSmallExp-8    7.84µs ± 0%    7.82µs ± 0%  -0.17%  (p=0.037 n=9+9)
ParseFloatLargeExp-8    29.3µs ± 1%    29.5µs ± 0%    ~     (p=0.059 n=9+8)
FloatSqrt/64-8           516ns ± 0%     519ns ± 0%  +0.54%  (p=0.000 n=9+9)
FloatSqrt/128-8         1.07µs ± 0%    1.07µs ± 0%    ~     (p=0.109 n=8+9)
FloatSqrt/256-8         1.23µs ± 0%    1.23µs ± 0%  +0.50%  (p=0.000 n=9+9)
FloatSqrt/1000-8        3.43µs ± 0%    3.44µs ± 0%  +0.53%  (p=0.000 n=9+8)
FloatSqrt/10000-8       40.9µs ± 0%    40.7µs ± 0%  -0.39%  (p=0.000 n=9+8)
FloatSqrt/100000-8      1.07ms ± 0%    1.07ms ± 0%  -0.10%  (p=0.017 n=10+9)
FloatSqrt/1000000-8     89.3ms ± 0%    89.2ms ± 0%  -0.07%  (p=0.015 n=9+8)

Change-Id: Ibf07c6142719d11bc7f329246957d87a9f3ba3d2
GitHub-Last-Rev: 870a041ab7
GitHub-Pull-Request: golang/go#31220
Reviewed-on: https://go-review.googlesource.com/c/go/+/170449
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
2019-04-04 00:26:24 +00:00
..
archive archive/tar, syscall: add statUnix for aix/ppc64 2019-02-27 23:40:20 +00:00
bufio
builtin builtin: make len's godoc less ambiguous 2019-03-13 20:57:32 +00:00
bytes bytes: merge explodetests into splittests 2019-04-03 14:46:01 +00:00
cmd cmd/compile: better recovery after := (rather than =) in declarations 2019-04-03 23:01:13 +00:00
compress cmd/go: further reduce init work 2019-03-31 10:49:55 +00:00
container
context context: don't depend on fmt 2019-03-27 02:37:56 +00:00
crypto crypto/tls: simplify intermediate certificate handling 2019-04-02 20:29:58 +00:00
database/sql database/sql: add example for DB.Prepare and Tx.Prepare 2019-03-25 15:51:17 +00:00
debug debug/dwarf: more graceful handling of unsupported types 2019-03-15 17:33:46 +00:00
encoding encoding/json: speed up tokenization of literals 2019-04-03 17:01:44 +00:00
errors fmt: make type of fmt.Errorf the same as that of errors.New 2019-03-14 09:45:22 +00:00
expvar
flag cmd/go: further reduce init work 2019-03-31 10:49:55 +00:00
fmt fmt: fix spelling mistake in example 2019-03-25 21:03:10 +00:00
go go/ast: fix SortImports to handle block comments 2019-03-28 23:49:52 +00:00
hash
html
image image/jpeg: reduce bound checks from idct and fdct 2019-04-02 23:18:37 +00:00
index/suffixarray
internal syscall: avoid _getdirentries64 on darwin 2019-04-03 21:27:05 +00:00
io
log log: expose Writer() method of the standard logger 2019-03-25 01:18:56 +00:00
math math/big: simplify shlVU_g and shrVU_g 2019-04-04 00:26:24 +00:00
mime mime: add .jpeg for builtin 2019-04-03 18:17:48 +00:00
net cmd/go: further reduce init work 2019-03-31 10:49:55 +00:00
os syscall: avoid _getdirentries64 on darwin 2019-04-03 21:27:05 +00:00
path path/filepath: add examples for Base, Dir and IsAbs 2019-03-25 02:57:06 +00:00
plugin cmd/compile: reorganize init functions 2019-03-18 20:10:55 +00:00
reflect reflect: document that method sets are lexicographically sorted 2019-04-03 19:00:48 +00:00
regexp
runtime syscall: avoid _getdirentries64 on darwin 2019-04-03 21:27:05 +00:00
sort sort, internal/reflectlite: flesh out reflectlite enough for use by sort 2019-03-27 04:58:23 +00:00
strconv strconv: simplify (*extFloat).Multiply using math/bits.Mul64 2019-03-04 22:25:21 +00:00
strings strings: document that NewReplacer can panic 2019-04-03 20:15:58 +00:00
sync
syscall syscall: avoid _getdirentries64 on darwin 2019-04-03 21:27:05 +00:00
testdata
testing testing: correct two spelling/grammar issues 2019-03-25 22:26:21 +00:00
text text/template: allow using -}} with many spaces 2019-03-24 09:06:14 +00:00
time time: optimize Sub 2019-03-19 04:10:33 +00:00
unicode
unsafe
vendor all: move internal/x to vendor/golang.org/x and revendor using 'go mod vendor' 2019-03-11 20:28:54 +00:00
all.bash
all.bat
all.rc
bootstrap.bash
buildall.bash
clean.bash
clean.bat
clean.rc
cmp.bash
go.mod
go.sum
iostest.bash
make.bash
make.bat
Make.dist
make.rc
naclmake.bash
nacltest.bash
race.bash
race.bat
run.bash
run.bat
run.rc