- 25 Mar, 2019 4 commits
-
-
Richard Musiol authored
go_js_wasm_exec was returning with code 0 if WebAssembly.instantiate failed. This made failing tests show as passed. Change-Id: Icfb2f42e9f1c3c70ca4a130a61a63cb305edff32 Reviewed-on: https://go-review.googlesource.com/c/go/+/168885 Run-TryBot: Richard Musiol <neelance@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Richard Musiol authored
Some WebAssembly runtimes (e.g. Node.js) fail to load a wasm binary if it has more than 100000 data segments. Do not skip zero regions any more if the limit was reached. Change-Id: I14c4c2aba142d1d2b887bce6d03b8c1c1746c5ec Reviewed-on: https://go-review.googlesource.com/c/go/+/168884 Run-TryBot: Richard Musiol <neelance@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
Hasan Ozgan authored
Change-Id: I7a438409748f0f9d6517a7ea1cdee6512ce3ca8a Reviewed-on: https://go-review.googlesource.com/c/go/+/161678 Run-TryBot: Rob Pike <r@golang.org> Reviewed-by: Rob Pike <r@golang.org>
-
Petr Jediný authored
The Go 1.12 introduced Writer() method for logger objects, but it was not exposed as log package function for standard logger. This commit adds such Writer() function. Change-Id: Ia81b1524839fe05c152ecb5eaef047a076349fea GitHub-Last-Rev: dc152ea641dd928178dbd921e2d0f6361661a0d6 GitHub-Pull-Request: golang/go#31009 Reviewed-on: https://go-review.googlesource.com/c/go/+/168920 Run-TryBot: Rob Pike <r@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rob Pike <r@golang.org>
-
- 24 Mar, 2019 3 commits
-
-
sergey authored
Most chars in URLs are lowercase, so check that first. Performance change: String-4 7.62µs ± 1% 7.27µs ± 3% -4.61% (p=0.008 n=5+5) QueryEscape/#00-4 92.6ns ± 3% 90.3ns ± 1% -2.48% (p=0.016 n=5+5) QueryEscape/#01-4 515ns ± 4% 510ns ± 2% ~ (p=0.683 n=5+5) QueryEscape/#02-4 375ns ± 1% 343ns ± 1% -8.52% (p=0.008 n=5+5) QueryEscape/#03-4 758ns ± 1% 699ns ± 1% -7.83% (p=0.008 n=5+5) QueryEscape/#04-4 6.06µs ± 1% 5.74µs ± 1% -5.38% (p=0.008 n=5+5) PathEscape/#00-4 140ns ± 1% 135ns ± 2% -3.85% (p=0.008 n=5+5) PathEscape/#01-4 511ns ± 3% 507ns ± 3% ~ (p=0.587 n=5+5) PathEscape/#02-4 372ns ± 1% 342ns ± 2% -8.22% (p=0.008 n=5+5) PathEscape/#03-4 747ns ± 1% 685ns ± 1% -8.30% (p=0.008 n=5+5) PathEscape/#04-4 5.94µs ± 1% 5.64µs ± 3% -4.98% (p=0.008 n=5+5) QueryUnescape/#00-4 111ns ± 4% 110ns ± 2% ~ (p=0.952 n=5+5) QueryUnescape/#01-4 390ns ± 0% 391ns ± 2% ~ (p=0.714 n=5+5) QueryUnescape/#02-4 297ns ± 5% 295ns ± 3% ~ (p=0.524 n=5+5) QueryUnescape/#03-4 543ns ± 3% 556ns ± 2% +2.39% (p=0.032 n=5+5) QueryUnescape/#04-4 3.23µs ± 3% 3.22µs ± 2% ~ (p=1.000 n=5+5) PathUnescape/#00-4 111ns ± 1% 110ns ± 3% ~ (p=0.881 n=5+5) PathUnescape/#01-4 389ns ± 2% 386ns ± 2% ~ (p=0.444 n=5+5) PathUnescape/#02-4 297ns ± 1% 295ns ± 3% ~ (p=0.738 n=5+5) PathUnescape/#03-4 557ns ± 3% 553ns ± 2% ~ (p=0.810 n=5+5) PathUnescape/#04-4 2.94µs ± 2% 2.97µs ± 2% ~ (p=0.222 n=5+5) Change-Id: I7e6d64cd5f8f5218cb40f52f0015168a8674aabb Reviewed-on: https://go-review.googlesource.com/c/go/+/168883Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Alex Brainman authored
TestScript executes PowerShell. And PowerShell appears to require WINDIR environment variable to exists on windows-arm. So keep WINDIR environment variable when running PowerShell. Fixes #30711 Change-Id: I14dde6614347325a8f3caf994ea8ab05294450a5 Reviewed-on: https://go-review.googlesource.com/c/go/+/168859 Run-TryBot: Alex Brainman <alex.brainman@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Daniel Martí authored
lexSpace consumed all spaces, even if the last one was part of a right delimiter like " -}}". Thus, "3 -}}" wouldn't lex as "3" and a right delimiter, but as "3", "-", and "}}". To fix that, make lexSpace stop if it encounters a right delimiter. Fixes #30948. Change-Id: I80a5546e5809e54f6823e2bf3a57a7e8808329be Reviewed-on: https://go-review.googlesource.com/c/go/+/168457Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
-
- 23 Mar, 2019 3 commits
-
-
Richard Musiol authored
This change adds the environment variable GOWASM, which is a comma separated list of experimental WebAssembly features that the compiled WebAssembly binary is allowed to use. The default is to use no experimental features. Initially there are no features avaiable. More information about feature proposals can be found at https://github.com/WebAssembly/proposals Change-Id: I4c8dc534c99ecff8bb075dded0186ca8f8decaef Reviewed-on: https://go-review.googlesource.com/c/go/+/168881 Run-TryBot: Richard Musiol <neelance@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Richard Musiol authored
This change optimizes the blocks in the wasm binary by generating the entryPointLoop only if it is used and adding an unwindExit block to be able to use the short BrIf instruction for unwinding the stack. These changes were suggested by the wasm-opt tool and reduce the wasm binary size of "hello world" by 1.5%. Change-Id: Ie52db2fa2d9b8482f9a78b7c189231750811fe97 Reviewed-on: https://go-review.googlesource.com/c/go/+/167937 Run-TryBot: Richard Musiol <neelance@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
Ben Shi authored
This CL implements MADD&MSUB, which are mips32r2 instructions. Change-Id: I06fe51573569baf3b71536336b34b95ccd24750b Reviewed-on: https://go-review.googlesource.com/c/go/+/167680 Run-TryBot: Ben Shi <powerman1st@163.com> Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
- 22 Mar, 2019 14 commits
-
-
Austin Clements authored
CL 166717 changed the way ns/op benchmark results were printed and inadvertently rounded all ns/op results down to an integer, even if they were small enough to print with digits after the decimal place. For example, prior to this change, we got output like BenchmarkFast-8 380491575 3.12 ns/op CL 166717 changed this to BenchmarkFast-8 380491575 3.00 ns/op This had the further side-effect that ns/op values between 0 and 1 would not be printed at all because they would be rounded down to 0. This CL fixes this by always recomputing the float64 value of ns/op instead of using the int64 truncation from BenchmarkResult.NsPerOp. Fixes #30997. Fixes #31005. Change-Id: I21f73b9d5cc5ad41e7ff535675d07ca00051ecd7 Reviewed-on: https://go-review.googlesource.com/c/go/+/168937Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
-
Dmitri Shuralyov authored
This change is a re-apply of the reverted CL 140863 with changes to address issue #30821. Specifically, path.Split continues to be used to split the '/'-separated import path, rather than filepath.Split. Document the algorithm for how the default executable name is determined in DefaultExecName. Rename a variable returned from os.Stat from bs to fi for consistency. CL 140863 factored out the logic to determine the default executable name from the Package.load method into a DefaultExecName function, and started using it in more places to avoid having to re-implement the logic everywhere it's needed. Most previous callers already computed the default executable name based on the import path. The load.Package method, before CL 140863, was the exception, in that it used the p.Dir value in GOPATH mode instead. There was a NOTE(rsc) comment that it should be equivalent to use import path, but it was too late in Go 1.11 cycle to risk implementing that change. This is part 1, a more conservative change for backporting to Go 1.12.2, and it keeps the original behavior of splitting on p.Dir in GOPATH mode. Part 2 will address the NOTE(rsc) comment and modify behavior in Package.load to always use DefaultExecName which splits the import path rather than directory. It is intended to be included in Go 1.13. Fixes #27283 (again) Updates #26869 Fixes #30821 Change-Id: Ib1ebb95acba7c85c24e3a55c40cdf48405af34f3 Reviewed-on: https://go-review.googlesource.com/c/go/+/167503Reviewed-by: Jay Conrod <jayconrod@google.com> Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
-
Dmitri Shuralyov authored
This reverts CL 140863 (commit bf94fc3a). Reason for revert: There was a potential problem spotted in the original fix, which resulted in it being rolled back from release-branch.go1.12 and not included in Go 1.12.1 release. We intend to improve the fix and include it in Go 1.12.2 instead. To make the fix easier to backport, revert this change before re-applying the improved fix (next commit). Change-Id: If6c785f58482d2531b5927c5ea7002f548c21c7c Reviewed-on: https://go-review.googlesource.com/c/go/+/168402Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
-
Than McIntosh authored
Introduce a new linker command line option "-strictdups", which enables sanity checking of "ok to duplicate" symbols, especially DWARF info symbols. Acceptable values are 0 (no checking) 1 (issue warnings) and 2 (issue a fatal error checks fail). Currently if we read a DWARF symbol (such as "go.info.PKG.FUNCTION") from one object file, and then encounter the same symbol later on while reading another object file, we simply discard the second one and move on with the link, since the two should in theory be identical. If as a result of a compiler bug we wind up with symbols that are not identical, this tends to (silently) result in incorrect DWARF generation, which may or may not be discovered depending on who is consuming the DWARF and what's being done with it. When this option is turned on, at the point where a duplicate symbol is detected in the object file reader, we check to make sure that the length/contents of the symbol are the same as the previously read symbol, and print a descriptive warning (or error) if not. For the time being this can be used for one-off testing to find problems; at some point it would be nice if we can enable it by default. Updates #30908. Change-Id: I64c4e07c326b4572db674ff17c93307e2eec607c Reviewed-on: https://go-review.googlesource.com/c/go/+/168410 Run-TryBot: Than McIntosh <thanm@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Daniel Martí authored
A lot of the naked for loops begin like: for { v := b.Control if v.Op != OpConstBool { break } ... return true } Instead, write them out in a more compact and readable way: for v.Op == OpConstBool { ... return true } This requires the addition of two bytes.Buffer writers, as this helps us make a decision based on future pieces of generated code. This probably makes rulegen slightly slower, but that's not noticeable; the code generation still takes ~3.5s on my laptop, excluding build time. The "v := b.Control" declaration can be moved to the top of each function. Even though the rules can modify b.Control when firing, they also make the function return, so v can't be used again. While at it, remove three unnecessary lines from the top of each rewriteBlock func. In total, this results in ~4k lines removed from the generated code, and a slight improvement in readability. Change-Id: I317e4c6a4842c64df506f4513375475fad2aeec5 Reviewed-on: https://go-review.googlesource.com/c/go/+/167399 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Richard Musiol authored
This change implements the following functions on js/wasm: - os.Chown - os.Fchown - os.Lchown - syscall.Getuid - syscall.Getgid - syscall.Geteuid - syscall.Getegid - syscall.Getgroups - syscall.Getpid - syscall.Getppid - syscall.Umask Change-Id: Icdb0fafc02c9df6e9e3573542f8499c3464dc671 Reviewed-on: https://go-review.googlesource.com/c/go/+/154157 Run-TryBot: Richard Musiol <neelance@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
erifan01 authored
This CL deals with the additional comments of CL 159017. Change-Id: I4ad3c60c834646d58dc0c544c741b92bfe83fb8b Reviewed-on: https://go-review.googlesource.com/c/go/+/168857Reviewed-by: Cherry Zhang <cherryyz@google.com> Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Iskander Sharipov authored
Change-Id: I4f8d0178e780b86d1f551b367e2ddac3789be5aa Reviewed-on: https://go-review.googlesource.com/c/go/+/168880 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Clément Chigot authored
Change-Id: I939518462c931ba9feb125b2f299ef0706b124ce Reviewed-on: https://go-review.googlesource.com/c/go/+/168879 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Clément Chigot authored
Enable pattern lib.a/shared.so.X in cgo_import_dynamic as on AIX, archive files (.a) often have shared objects (.so) inside them. Change-Id: I21096c75eb7fbcc7064b0b832bfa8ed862142051 Reviewed-on: https://go-review.googlesource.com/c/go/+/168877 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Clément Chigot authored
Change-Id: Ia78ea589cc6d58ff22f7d519399c06c5308419dd Reviewed-on: https://go-review.googlesource.com/c/go/+/168878Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
-
Andrei Tudor Călin authored
Add a Fuzz function to package png, under the gofuzz build tag. This function is based on the png/png.go code, from github.com/dvyukov/go-fuzz-corpus, modified to use direct comparison of image bounds rather than reflect.DeepEqual. Updates #30979 Updates #19109 Change-Id: Idb86e7ded0c2d78e6cadbeda84c7b1f35b8c579c Reviewed-on: https://go-review.googlesource.com/c/go/+/168558Reviewed-by: thepudds <thepudds1460@gmail.com> Reviewed-by: Dmitry Vyukov <dvyukov@google.com> Run-TryBot: Dmitry Vyukov <dvyukov@google.com>
-
Tobias Klauser authored
Change-Id: I64e05a1f768cb57194506021bb7fdca0ad19bf1c Reviewed-on: https://go-review.googlesource.com/c/go/+/168461 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Josh Bleecher Snyder authored
This disrupts code instrumentation tools like go-fuzz. Change-Id: I524f31316975096ca5e3b1203a82e91ed1b6097e Reviewed-on: https://go-review.googlesource.com/c/go/+/168801 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
- 21 Mar, 2019 14 commits
-
-
Richard Musiol authored
This change optimizes the data section in the wasm binary by omitting blocks of zeroes and instead emitting data segments with offsets skipping the zeroes. This optimization is inspired by the memory-packing pass of the wasm-opt tool and reduces the wasm binary size of "hello world" by 14%. Change-Id: Iba3043df05bf6aab4745c5f8015c0337fc218aff Reviewed-on: https://go-review.googlesource.com/c/go/+/167801 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
Nigel Tao authored
When gif.Encode is given an "m image.Image" argument that isn't an *image.Paletted, it creates a temporary *image.Paletted (called pm) that is intended to be a copy of this image, only with fewer colors. That creation process, and specifically the opts.Drawer.Draw call that does the copy, incorrectly assumed that m.Bounds().Min is the zero point (0, 0). This commit fixes that. Fixes #30887 Change-Id: Ie03bddec359e2dcc52f18451049452105514e179 Reviewed-on: https://go-review.googlesource.com/c/go/+/168418 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rob Pike <r@golang.org>
-
Cherry Zhang authored
It is possible that a "volatile" value (one that can be clobbered by preparing args of a call) to be used in multiple write barrier calls. We used to copy the volatile value right before each call. But this doesn't work if the value is used the second time, after the first call where it is already clobbered. Copy it before emitting any call. Fixes #30977. Change-Id: Iedcc91ad848d5ded547bf37a8359c125d32e994c Reviewed-on: https://go-review.googlesource.com/c/go/+/168677 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Elias Naur authored
Noticed by Ingo Oeser in his review of CL 168321. Change-Id: I2f39db675a7c22b395062a11903657a9d0d1956d Reviewed-on: https://go-review.googlesource.com/c/go/+/168560 TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Dmitri Shuralyov authored
The Import function was moved from modfetch/repo.go to modload/import.go in vgo CL 122880, and its semantics have changed in vgo CL 123095 to do more than just searching for a module. Both of these changes were ported to cmd/go in CL 123576. Delete the mention of the old Import function from the modfetch/repo.go comment, since what it refers to does not exist anymore. Change-Id: I6dc6984128152cf9611d30fbc4e6418e91a7641f Reviewed-on: https://go-review.googlesource.com/c/go/+/166597Reviewed-by: Jay Conrod <jayconrod@google.com>
-
Alberto Donizetti authored
New release, it broke again the longtest builder. Align the expected data with the current release. Making these tests independent of external repositories is #28856. This fixes the longtest builder. Updates #28856 Change-Id: I32d2f3325af828d26ab417a5e986e3aeefa1a897 Reviewed-on: https://go-review.googlesource.com/c/go/+/168561 Run-TryBot: Alberto Donizetti <alb.donizetti@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Josh Bleecher Snyder authored
Change-Id: I7e921b7b4665ff76dc8bae493b2a49318690770b Reviewed-on: https://go-review.googlesource.com/c/go/+/168637 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Michael Munday <mike.munday@ibm.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Elias Naur authored
The iOS exec wrapper copies the environment variables to the binary running on the device. However, some variables such as HOME, TMPDIR and GOCACHE refer to directories that might not be valid on the device. The wrapper already ignores HOME and TMPDIR, but after GO111MODULE was flipped to on for the standard library, cmd/go tests started failing without a valid and writable GOCACHE. It took a while to reproduce because go test does not set an explicit GOCACHE but cmd/dist test does. Fixes #30914 Change-Id: If186cddc5cfd7ad39a0b3eb95f9c64a7d53a27e3 Reviewed-on: https://go-review.googlesource.com/c/go/+/168557 Run-TryBot: Elias Naur <mail@eliasnaur.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Elias Naur authored
Android devices don't have git available, so many go tool commands that fetch dependencies fail. Builders already have a GOPROXY available, so pass that along to the device environment. Updates #30885 Change-Id: Id0d2338932f0cd7de4d95d9e0ca9b79d29336ffe Reviewed-on: https://go-review.googlesource.com/c/go/+/168118 TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Josh Bleecher Snyder authored
The initial implementation is intentionally simple. Let's see how far it gets us. Fixes #30638 Change-Id: I240afae2b401744ab2ff2a69952c4eb0fd3feb56 Reviewed-on: https://go-review.googlesource.com/c/go/+/168518 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Elias Naur authored
While we're here, move the test from dwarf_test.go to link_test.go; it doesn't have anything to do with DWARF. Should fix the macOS builders with only the Xcode command line tools installed. Change-Id: Iaaba1b589f4d778705f7b627f78c2b12388e2b3b Reviewed-on: https://go-review.googlesource.com/c/go/+/168462 TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
-
Elias Naur authored
To build for watchOS and tvOS the Apple toolchain requires a Mach-O load command that matches the platform for all object files in a build. The go.o object file produced by the Go linker contains no such command. The loader commands are mutually exclusive so we need to pick the right one. Fortunately, cgo must be enabled for watchOS and tvOS to be useful, so we can copy the first loader command we find in the object files produced by the host compiler. Add a test that builds a small program for tvOS to test both this CL and the previous CL that added bitcode support. Updates #22395 Change-Id: I7a47d19be9d80f0459dc358c600cddd9f236c444 Reviewed-on: https://go-review.googlesource.com/c/go/+/168321 TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
Elias Naur authored
We're going to need the ability to extract the LC_VERSION_MIN_* and LC_BUILD_VERSION load commands. This CL adds peekMachoPlatform to do that and in the process simplifies machoCombineDwarf. While here, disable DWARF combining for Apple platforms other than macOS (watchOS, tvOS, bridgeOS), not just iOS. Updates #22395 Change-Id: I4862b0f15ccc87b7be1a6532b4d37b47c8f7f243 Reviewed-on: https://go-review.googlesource.com/c/go/+/168459Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Elias Naur authored
The Go toolchain cannot output bitcode, but there is a trick where object code can be marked with an __asm section, persuading the Apple toolchain to include our object code in bitcode builds. This enables Go builds with bitcode enabled; the next CL adds the necessary plumbing for building on tvOS and watchOS. Thanks to Aman Gupta for the trick. Test is added two CLs from here. Fixes #22395 (at least until Apple tightens bitcode requirements.) Change-Id: Ic1c1448c4d46222bb3dd097b1f4df80848051e5f Reviewed-on: https://go-review.googlesource.com/c/go/+/168320Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
- 20 Mar, 2019 2 commits
-
-
Josh Bleecher Snyder authored
The original goal of rounding to readable b.N was to make it easier to eyeball times. However, proper analysis requires tooling (such as benchstat) anyway. Instead, take b.N as it comes. This will reduce the impact of external noise such as GC on benchmarks. This requires reworking our iteration estimates. We used to calculate the estimated ns/op and then divide our target ns by that estimate. However, this order of operations was destructive when the ns/op was very small; rounding could hide almost an order of magnitude of variation. Instead, multiply first, then divide. Also, make n an int64 to avoid overflow. Prior to this change, we attempted to cap b.N at 1e9. Due to rounding up, it was possible to get b.N as high as 2e9. This change consistently enforces the 1e9 cap. This change also reduces the wall time required to run benchmarks. Here's the impact of this change on the wall time to run all benchmarks once with benchtime=1s on some std packages: name old time/op new time/op delta bytes 306s ± 1% 238s ± 1% -22.24% (p=0.000 n=10+10) encoding/json 112s ± 8% 99s ± 7% -11.64% (p=0.000 n=10+10) net/http 54.7s ± 7% 44.9s ± 4% -17.94% (p=0.000 n=10+9) runtime 957s ± 1% 714s ± 0% -25.38% (p=0.000 n=10+9) strings 262s ± 1% 201s ± 1% -23.27% (p=0.000 n=10+10) [Geo mean] 216s 172s -20.23% Updates #24735 Change-Id: I7e38efb8e23c804046bf4fc065b3f5f3991d0a15 Reviewed-on: https://go-review.googlesource.com/c/go/+/112155Reviewed-by: Austin Clements <austin@google.com>
-
Carlos Eduardo Seo authored
cmd/compile/internal, cmd/internal/obj/ppc64: generate new count trailing zeros instructions on POWER9 This change adds new POWER9 instructions for counting trailing zeros (CNTTZW/CNTTZD) to the assembler and generates them in SSA when GOPPC64=power9. name old time/op new time/op delta TrailingZeros-160 1.59ns ±20% 1.45ns ±10% -8.81% (p=0.000 n=14+13) TrailingZeros8-160 1.55ns ±23% 1.62ns ±44% ~ (p=0.593 n=13+15) TrailingZeros16-160 1.78ns ±23% 1.62ns ±38% -9.31% (p=0.003 n=14+14) TrailingZeros32-160 1.64ns ±10% 1.49ns ± 9% -9.15% (p=0.000 n=13+14) TrailingZeros64-160 1.53ns ± 6% 1.45ns ± 5% -5.38% (p=0.000 n=15+13) Change-Id: I365e6ff79f3ce4d8ebe089a6a86b1771853eb596 Reviewed-on: https://go-review.googlesource.com/c/go/+/167517Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
-