Find a file
Clément Chigot cebf9d47cf cmd/link: optimize access to data symbols for aix/ppc64
This commit changes the second instruction used to retrieve a symbol on
aix/ppc64 if it is in .data or .bss section.

The previous version always retrieves the symbol address via a load on
its TOC symbol. However, as the TOC is also in .data, the symbol's address
is close enough to be fetched directly and the load instruction can be
replaced by an addi.

Bench go1
benchmark                             old ns/op      new ns/op      delta
BenchmarkBinaryTree17-16              5919354000     5824897000     -1.60%
BenchmarkFannkuch11-16                5206937000     5162043000     -0.86%
BenchmarkFmtFprintfEmpty-16           106            105            -0.94%
BenchmarkFmtFprintfString-16          165            165            +0.00%
BenchmarkFmtFprintfInt-16             165            167            +1.21%
BenchmarkFmtFprintfIntInt-16          303            239            -21.12%
BenchmarkFmtFprintfPrefixedInt-16     282            283            +0.35%
BenchmarkFmtFprintfFloat-16           434            381            -12.21%
BenchmarkFmtManyArgs-16               1797           903            -49.75%
BenchmarkGobDecode-16                 16000450       12173630       -23.92%
BenchmarkGobEncode-16                 12007010       10258070       -14.57%
BenchmarkGzip-16                      638581500      456050333      -28.58%
BenchmarkGunzip-16                    111976900      74943900       -33.07%
BenchmarkHTTPClientServer-16          206850         153716         -25.69%
BenchmarkJSONEncode-16                32057380       17517130       -45.36%
BenchmarkJSONDecode-16                182606400      106807700      -41.51%
BenchmarkMandelbrot200-16             6896975        5616903        -18.56%
BenchmarkGoParse-16                   11248260       6094115        -45.82%
BenchmarkRegexpMatchEasy0_32-16       292            148            -49.32%
BenchmarkRegexpMatchEasy0_1K-16       540            327            -39.44%
BenchmarkRegexpMatchEasy1_32-16       243            150            -38.27%
BenchmarkRegexpMatchEasy1_1K-16       1029           657            -36.15%
BenchmarkRegexpMatchMedium_32-16      423            230            -45.63%
BenchmarkRegexpMatchMedium_1K-16      107250         59683          -44.35%
BenchmarkRegexpMatchHard_32-16        3353           3139           -6.38%
BenchmarkRegexpMatchHard_1K-16        107277         93610          -12.74%
BenchmarkRevcomp-16                   1124311500     677442500      -39.75%
BenchmarkTemplate-16                  241286600      109177400      -54.75%
BenchmarkTimeParse-16                 1058           562            -46.88%
BenchmarkTimeFormat-16                1321           581            -56.02%

benchmark                            old MB/s     new MB/s     speedup
BenchmarkGobDecode-16                47.97        63.05        1.31x
BenchmarkGobEncode-16                63.92        74.82        1.17x
BenchmarkGzip-16                     30.39        42.55        1.40x
BenchmarkGunzip-16                   173.29       258.92       1.49x
BenchmarkJSONEncode-16               60.53        110.78       1.83x
BenchmarkJSONDecode-16               10.63        18.17        1.71x
BenchmarkGoParse-16                  5.15         9.50         1.84x
BenchmarkRegexpMatchEasy0_32-16      109.42       215.86       1.97x
BenchmarkRegexpMatchEasy0_1K-16      1896.22      3126.28      1.65x
BenchmarkRegexpMatchEasy1_32-16      131.46       212.99       1.62x
BenchmarkRegexpMatchEasy1_1K-16      994.55       1557.51      1.57x
BenchmarkRegexpMatchMedium_32-16     2.36         4.34         1.84x
BenchmarkRegexpMatchMedium_1K-16     9.55         17.16        1.80x
BenchmarkRegexpMatchHard_32-16       9.54         10.19        1.07x
BenchmarkRegexpMatchHard_1K-16       9.55         10.94        1.15x
BenchmarkRevcomp-16                  226.06       375.19       1.66x
BenchmarkTemplate-16                 8.04         17.77        2.21x

Change-Id: Iaf2aa5953b99271361510c69a5ced3371f6c6c20
Reviewed-on: https://go-review.googlesource.com/c/151201
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-12-18 15:42:01 +00:00
.github .github: don't render author-facing text in ISSUE_TEMPLATE 2018-11-02 04:47:34 +00:00
api syscall: FreeBSD 12 ino64 support 2018-10-05 21:38:13 +00:00
doc doc/1.12: add notes about aix/ppc64 port 2018-12-18 15:25:24 +00:00
lib/time lib/time: update tzdata to 2018g 2018-11-28 08:22:56 +00:00
misc cmd/fix,cmd/cgo,misc/cgo: map the EGLDisplay C type to uintptr in Go 2018-12-15 19:27:41 +00:00
src cmd/link: optimize access to data symbols for aix/ppc64 2018-12-18 15:42:01 +00:00
test cmd/compile: increase nesting depth limit for type descriptors 2018-12-18 00:13:58 +00:00
.gitattributes
.gitignore .gitignore: ignore src/cmd/dist/dist 2017-10-28 21:55:49 +00:00
AUTHORS A+C: add VMware as author, Venil Noronha as contributor 2018-08-31 02:14:24 +00:00
CONTRIBUTING.md all: restore changes from faulty merge/revert 2018-02-12 20:13:59 +00:00
CONTRIBUTORS A+C: add VMware as author, Venil Noronha as contributor 2018-08-31 02:14:24 +00:00
favicon.ico website: recreate 16px and 32px favicon 2016-08-25 15:43:32 +00:00
LICENSE doc: revert copyright date to 2009 2016-06-01 22:40:04 +00:00
PATENTS
README.md README: linkify some paths 2018-06-06 18:07:01 +00:00
robots.txt

The Go Programming Language

Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.

Gopher image Gopher image by Renee French, licensed under Creative Commons 3.0 Attributions license.

Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.

Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.

Download and Install

Binary Distributions

Official binary distributions are available at https://golang.org/dl/.

After downloading a binary release, visit https://golang.org/doc/install or load doc/install.html in your web browser for installation instructions.

Install From Source

If a binary distribution is not available for your combination of operating system and architecture, visit https://golang.org/doc/install/source or load doc/install-source.html in your web browser for source installation instructions.

Contributing

Go is the work of thousands of contributors. We appreciate your help!

To contribute, please read the contribution guidelines: https://golang.org/doc/contribute.html

Note that the Go project uses the issue tracker for bug reports and proposals only. See https://golang.org/wiki/Questions for a list of places to ask questions about the Go language.