- 19 Mar, 2019 23 commits
-
-
Josh Bleecher Snyder authored
This shaves a few bytes off here and there. file before after Δ % buildid 2865992 2861896 -4096 -0.143% pprof 14744060 14739964 -4096 -0.028% trace 11680644 11676548 -4096 -0.035% vet 8448240 8444144 -4096 -0.048% Change-Id: I799034afabc06a37b535301cd1380d63b4461095 Reviewed-on: https://go-review.googlesource.com/c/go/+/168343 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Martin Möhrmann <martisch@uos.de>
-
Josh Bleecher Snyder authored
'SUBQ $-0x80, r' is shorter to encode than 'ADDQ $0x80, r', and functionally equivalent. Use it instead. Shaves off a few bytes here and there: file before after Δ % compile 25935856 25927664 -8192 -0.032% nm 4251840 4247744 -4096 -0.096% Change-Id: Ia9e02ea38cbded6a52a613b92e3a914f878d931e Reviewed-on: https://go-review.googlesource.com/c/go/+/168344 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Josh Bleecher Snyder authored
* Reduce the scope of q. * Remove duplicate handling of AADJSP. * Move ab declaration closer to use. * Collapse nested if statements. * Change declaration of n for increased readability in context. * Simplify AADJSP handling. Passes toolstash-check. Change-Id: I046369477db567f2f7c4a9c8d400ec9dd9c32f3f Reviewed-on: https://go-review.googlesource.com/c/go/+/168342 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
David Chase authored
Behavior improved, file expects old worse behavior. Update file to expect newer, better output. Fixes #30912. Change-Id: I410bdaacdb77a4620656753c8c0dc2d4d5378985 Reviewed-on: https://go-review.googlesource.com/c/go/+/168377 Run-TryBot: David Chase <drchase@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Katie Hockman <katie@golang.org>
-
Josh Bleecher Snyder authored
Flagalloc has the unenviable task of splitting flag-generating ops that have been merged with loads when the flags need to "spilled" (i.e. regenerated). Since there weren't very many of them, there was a hard-coded list of ops and bespoke code written to split them. This change migrates load splitting into rewrite rules, to make them easier to maintain. Change-Id: I7750eafb888a802206c410f9c341b3133e7748b8 Reviewed-on: https://go-review.googlesource.com/c/go/+/166978 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Tobias Klauser authored
Simple single-byte loop count for now, to be further improved in future CLs. Benchmark on linux/arm: name old time/op new time/op delta CountSingle/10-4 122ns ± 0% 87ns ± 1% -28.41% (p=0.000 n=7+10) CountSingle/32-4 242ns ± 0% 174ns ± 1% -28.25% (p=0.000 n=10+10) CountSingle/4K-4 24.2µs ± 1% 15.6µs ± 1% -35.42% (p=0.000 n=10+10) CountSingle/4M-4 29.6ms ± 1% 21.3ms ± 1% -28.09% (p=0.000 n=10+9) CountSingle/64M-4 562ms ± 0% 414ms ± 1% -26.23% (p=0.000 n=8+10) name old speed new speed delta CountSingle/10-4 81.7MB/s ± 1% 114.5MB/s ± 1% +40.07% (p=0.000 n=10+10) CountSingle/32-4 132MB/s ± 0% 184MB/s ± 1% +39.39% (p=0.000 n=10+9) CountSingle/4K-4 170MB/s ± 1% 263MB/s ± 1% +54.86% (p=0.000 n=10+10) CountSingle/4M-4 142MB/s ± 1% 197MB/s ± 1% +39.07% (p=0.000 n=10+9) CountSingle/64M-4 119MB/s ± 0% 162MB/s ± 1% +35.55% (p=0.000 n=8+10) Updates #29001 Change-Id: I42a268215a62044286ec32b548d8e4b86b9570ee Reviewed-on: https://go-review.googlesource.com/c/go/+/168319 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
Austin Clements authored
This adds a ReportMetric method to testing.B that lets the user report custom benchmark metrics and override built-in metrics. Fixes #26037. Change-Id: I8236fbde3683fc27bbe45cbbedfd377b435edf64 Reviewed-on: https://go-review.googlesource.com/c/go/+/166717 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
-
LE Manh Cuong authored
MIME sniffing standard defines the RAR signature as 52 61 72 20 1A 07 00. But this signature is wrong, the RARlab spec defines the 4th byte must be 0x21 or "!", not 0x20 or " ". Checking a rar file also indicates that: $ file abc.rar abc.rar: RAR archive data, v1d, os: Win32 $ head -c 7 abc.rar | od -v -t x1 0000000 52 61 72 21 1a 07 00 0000007 There is also an issue to fix this problem in MIME standard. See: - https://www.rarlab.com/technote.htm#rarsign - https://github.com/whatwg/mimesniff/issues/63 Fixes #30926 Change-Id: Id2e2de7ecbf7f44d37ebaf280efd05e4972c5078 Reviewed-on: https://go-review.googlesource.com/c/go/+/167781Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Elias Naur authored
Updates #22395 Change-Id: I6c207934b32d38374875f756c4f8c6dfe38d8cb0 Reviewed-on: https://go-review.googlesource.com/c/go/+/168318 Run-TryBot: Elias Naur <mail@eliasnaur.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Ian Lance Taylor authored
This works around the NetBSD <stdint.h> which defines the type using "#define" rather than typedef. Fixes #30918 Updates #29878 Change-Id: I8998eba52139366ae46762bdad5fcae85f9b4027 Reviewed-on: https://go-review.googlesource.com/c/go/+/168337Reviewed-by: Benny Siegert <bsiegert@gmail.com> Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Jay Conrod authored
This fixes two problems missed in CL 164877. First, p.Internal.BuildInfo is now part of the cache key. This is important since p.Internal.BuildInfo causes the build action to synthesize a new source file, which affects the output. Second, recompileForTest is always called for test packages. Previously, it was only called when there were internal test sources, so the fix in CL 164877 did not apply to packages that only had external tests. Fixes #30374 Change-Id: Iac2d7e8914f0313f9ab4222299a866f67889eb2e Reviewed-on: https://go-review.googlesource.com/c/go/+/168200 Run-TryBot: Jay Conrod <jayconrod@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Clément Chigot authored
Change-Id: I9d14142977b4f2e8cb7ed33582249d0448bae023 Reviewed-on: https://go-review.googlesource.com/c/go/+/164016 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Clément Chigot authored
This commit removes spaces which were wrongly added in //go:cgo_export_static during CL 164010. Change-Id: Iadd18efdde9ff32e907d793a72ef0f9efda35fe6 Reviewed-on: https://go-review.googlesource.com/c/go/+/168317 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Clément Chigot authored
This commit fixes runtime.sigfwd for aix/ppc64. fn is a function descriptor and not a function. R2 must be saved and restored. Change-Id: Ie506b0bdde562ca37202d19973ba1d537c3d64e2 Reviewed-on: https://go-review.googlesource.com/c/go/+/164015Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Mikio Hara authored
This change makes the runtime-integrated network poller report only critical event scanning errors. In the previous attempt, CL 166497, we treated any combination of error events as event scanning errors and it caused false positives in event waiters because platform-dependent event notification mechanisms allow event originators to use various combination of events. To avoid false positives, this change makes the poller treat an individual error event as a critical event scanning error by the convention of event notification mechanism implementations. Updates #30624. Fixes #30817. Fixes #30840. Change-Id: I906c9e83864527ff73f636fd02bab854d54684ea Reviewed-on: https://go-review.googlesource.com/c/go/+/167777 Run-TryBot: Mikio Hara <mikioh.public.networking@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Clément Chigot authored
Change-Id: Icc42843adb15c2aba1cfea854fad049c6704344b Reviewed-on: https://go-review.googlesource.com/c/go/+/164014 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Wèi Cōngruì authored
When closing a pipe, use CancelIoEx to cancel pending I/O. This makes concurrent Read and Write calls return os.ErrClosed. This change also enables some pipe tests on Windows. Fixes #28477 Fixes #25835 Change-Id: If52bb7d80895763488a61632e4682a78336e8420 Reviewed-on: https://go-review.googlesource.com/c/go/+/164721 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Clément Chigot authored
This commit disables new cgo pprof tests and adds an handler in sigtramp to refuse SIGPROF signal. Updates #28555 Change-Id: I152a871f8636e93328d411329104c6f023bd1691 Reviewed-on: https://go-review.googlesource.com/c/go/+/164013 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Michael Darakananda authored
This is primarily achieved by checking for arithmetic overflow instead of using Add and Equal. It's a decent performance improvement even though the function still isn't inlined. name old time/op new time/op delta Sub-6 242ns ± 0% 122ns ± 0% -49.59% (p=0.002 n=8+10) Updates #17858. Change-Id: I1469b618183c83ea8ea54d5ce277eb15f2ec0f11 Reviewed-on: https://go-review.googlesource.com/c/go/+/131196 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Clément Chigot authored
This commit fixes TestSigStackSwapping by increasing the signal stack size. This is needed because SIGSTKSZ is too small when VMX is used on AIX. Change-Id: Ic2b5faa65745228d0768383b3d6ebd4b6f9f532c Reviewed-on: https://go-review.googlesource.com/c/go/+/164012 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Clément Chigot authored
This commit adds C support for os/user package for aix/ppc64. Updates #30563 Change-Id: Id07646998a7243b1335b85b5d4fe5bc4114e2a88 Reviewed-on: https://go-review.googlesource.com/c/go/+/164039 Run-TryBot: Mikio Hara <mikioh.public.networking@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Clément Chigot authored
This commit adds C support for net package for aix/ppc64. Change-Id: I704710991fc013c6ec3511671def6791df4854f1 Reviewed-on: https://go-review.googlesource.com/c/go/+/164038 Run-TryBot: Mikio Hara <mikioh.public.networking@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Mikio Hara <mikioh.public.networking@gmail.com>
-
Clément Chigot authored
C trampolines are made by fixup CSECTS which are added between two symbols. If such CSECTS is added inside Go functions, all method offsets stored in moduledatas will be wrong. In order to prevent this, every C code is moved at the end of the executable and long calls are created for GO functions called by C code. The main function can't longer be made in Go as AIX __start isn't using a long call to branch on it. Therefore, a main is defined on runtime/cgo. Change-Id: I214b18decdb83107cf7325b298609eef9f9d1330 Reviewed-on: https://go-review.googlesource.com/c/go/+/164010 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 18 Mar, 2019 13 commits
-
-
Keith Randall authored
When initializing a new object, we're often writing 1) to a location that doesn't have a pointer to a heap object 2) a pointer that doesn't point to a heap object When both those conditions are true, we can avoid the write barrier. This CL detects case 1 by looking for writes to known-zeroed locations. The results of runtime.newobject are zeroed, and we perform a simple tracking of which parts of that object are written so we can determine what part remains zero at each write. This CL detects case 2 by looking for addresses of globals (including the types and itabs which are used in interfaces) and for nil pointers. Makes cmd/go 0.3% smaller. Some particular cases, like the slice literal in #29573, can get much smaller. TODO: we can remove actual zero writes also with this mechanism. Update #29573 Change-Id: Ie74a3533775ea88da0495ba02458391e5db26cb9 Reviewed-on: https://go-review.googlesource.com/c/go/+/156363 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
Philipp Stephani authored
The exact-width integer types are required to use two’s complement representation and may not have padding bits, cf. §7.20.1.1/1 in the C11 standard or https://en.cppreference.com/w/c/types/integer. This ensures that they have the same domain and representation as the corresponding Go types. Fixes #29878 Change-Id: Ie8a51e91666dfd89731c7859abe47356c94ca1be GitHub-Last-Rev: 546a2cc3f1e22dc282757f73c01c91b00899d911 GitHub-Pull-Request: golang/go#29907 Reviewed-on: https://go-review.googlesource.com/c/go/+/159258 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Keith Randall authored
The name change init -> init.ializers was initially required for initialization code. With CL 161337 there's no wrapper code any more, there's a data structure instead (named .inittask). So we can go back to just plain init appearing in tracebacks. RELNOTE=yes Update #29919. Followon to CL 161337. Change-Id: I5a4a49d286df24b53b2baa193dfda482f3ea82a5 Reviewed-on: https://go-review.googlesource.com/c/go/+/167780 Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
bakape authored
Change-Id: Id9dedc861523e2dafe0e67f70862973124fa07b3 GitHub-Last-Rev: b662561f1980dff9861dd8a738c75a03baa72681 GitHub-Pull-Request: golang/go#30909 Reviewed-on: https://go-review.googlesource.com/c/go/+/168039Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Keith Randall authored
Some of the registers in which indexes + length were supposed to be passed were wrong. Update #30116 Change-Id: I1089366b7429c1e0ecad9219b847db069ce6b5d6 Reviewed-on: https://go-review.googlesource.com/c/go/+/168041 Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Keith Randall authored
Instead of writing an init function per package that does the same thing for every package, just write that implementation once in the runtime. Change the compiler to generate a data structure that encodes the required initialization operations. Reduces cmd/go binary size by 0.3%+. Most of the init code is gone, including all the corresponding stack map info. The .inittask structures that replace them are quite a bit smaller. Most usefully to me, there is no longer an init function in every -S output. (There is an .inittask global there, but it's much less distracting.) After this CL we could change the name of the "init.ializers" function back to just "init". Update #6853 R=go1.13 Change-Id: Iec82b205cc52fe3ade4d36406933c97dbc9c01b1 Reviewed-on: https://go-review.googlesource.com/c/go/+/161337 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
-
Joel Sing authored
Sort gohostos switch entries for readability/maintainability. Change-Id: I565b0aee33e8463502faa68eaceea6f7dccca66b Reviewed-on: https://go-review.googlesource.com/c/go/+/154379 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
-
Matthew Dempsky authored
golang.org/cl/166983 started serializing the Ninit field of OCALL nodes within function inline bodies (necessary to fix a regression in building crypto/ecdsa with -gcflags=-l=4), but this means the Ninit field needs to be typechecked when the imported function body is used. It's unclear why this wasn't necessary for the crypto/ecdsa regression. Fixes #30907. Change-Id: Id5f0bf3c4d17bbd6d5318913b859093c93a0a20c Reviewed-on: https://go-review.googlesource.com/c/go/+/168199 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Keith Randall authored
A few examples (for accessing a slice of length 3): s[-1] runtime error: index out of range [-1] s[3] runtime error: index out of range [3] with length 3 s[-1:0] runtime error: slice bounds out of range [-1:] s[3:0] runtime error: slice bounds out of range [3:0] s[3:-1] runtime error: slice bounds out of range [:-1] s[3:4] runtime error: slice bounds out of range [:4] with capacity 3 s[0:3:4] runtime error: slice bounds out of range [::4] with capacity 3 Note that in cases where there are multiple things wrong with the indexes (e.g. s[3:-1]), we report one of those errors kind of arbitrarily, currently the rightmost one. An exhaustive set of examples is in issue30116[u].out in the CL. The message text has the same prefix as the old message text. That leads to slightly awkward phrasing but hopefully minimizes the chance that code depending on the error text will break. Increases the size of the go binary by 0.5% (amd64). The panic functions take arguments in registers in order to keep the size of the compiled code as small as possible. Fixes #30116 Change-Id: Idb99a827b7888822ca34c240eca87b7e44a04fdd Reviewed-on: https://go-review.googlesource.com/c/go/+/161477 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
-
Daniel Theophanes authored
If -o points to a directory that exists then allow multiple executables to be written to that directory. Fixes #14295 Change-Id: Ic951e637c70a2ada5e7534bae9a43901a39fe2c5 Reviewed-on: https://go-review.googlesource.com/c/go/+/167679 Run-TryBot: Daniel Theophanes <kardianos@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
-
Martin Möhrmann authored
Divisions are generally slow. The compiler can optimize a division to use a sequence of faster multiplies and shifts (magic constants) if the divisor is not know at compile time. The value of the span element size in mcentral.grow is not known at compile time but magic constants to compute n / span.elementsize are already stored in class_to_divmagic and mspan. They however need to be adjusted to work for (0 <= n <= span.npages * pagesize) instead of (0 <= n < span.npages * pagesize). Change-Id: Ieea59f1c94525a88d012f2557d43691967900deb Reviewed-on: https://go-review.googlesource.com/c/go/+/148057 Run-TryBot: Martin Möhrmann <moehrmann@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com> Reviewed-by: Keith Randall <khr@golang.org>
-
Daniel Martí authored
In golang.org/cl/145218, a feature was added where the JSON decoder would keep track of the entire path to a field when reporting an UnmarshalTypeError. However, we all failed to check if this affected the benchmarks - myself included, as a reviewer. Below are the numbers comparing the CL's parent with itself, once it was merged: name old time/op new time/op delta CodeDecoder-8 12.9ms ± 1% 28.2ms ± 2% +119.33% (p=0.002 n=6+6) name old speed new speed delta CodeDecoder-8 151MB/s ± 1% 69MB/s ± 3% -54.40% (p=0.002 n=6+6) name old alloc/op new alloc/op delta CodeDecoder-8 2.74MB ± 0% 109.39MB ± 0% +3891.83% (p=0.002 n=6+6) name old allocs/op new allocs/op delta CodeDecoder-8 77.5k ± 0% 168.5k ± 0% +117.30% (p=0.004 n=6+5) The reason why the decoder got twice as slow is because it now allocated ~40x as many objects, which puts a lot of pressure on the garbage collector. The reason is that the CL concatenated strings every time a nested field was decoded. In other words, practically every field generated garbage when decoded. This is hugely wasteful, especially considering that the vast majority of JSON decoding inputs won't return UnmarshalTypeError. Instead, use a stack of fields, and make sure to always use the same backing array, to ensure we only need to grow the slice to the maximum depth once. The original CL also introduced a bug. The field stack string wasn't reset to its original state when reaching "d.opcode == scanEndObject", so the last field in a decoded struct could leak. For example, an added test decodes a list of structs, and encoding/json before this CL would fail: got: cannot unmarshal string into Go struct field T.Ts.Y.Y.Y of type int want: cannot unmarshal string into Go struct field T.Ts.Y of type int To fix that, simply reset the stack after decoding every field, even if it's the last. Below is the original performance versus this CL. There's a tiny performance hit, probably due to the append for every decoded field, but at least we're back to the usual ~150MB/s. name old time/op new time/op delta CodeDecoder-8 12.9ms ± 1% 13.0ms ± 1% +1.25% (p=0.009 n=6+6) name old speed new speed delta CodeDecoder-8 151MB/s ± 1% 149MB/s ± 1% -1.24% (p=0.009 n=6+6) name old alloc/op new alloc/op delta CodeDecoder-8 2.74MB ± 0% 2.74MB ± 0% +0.00% (p=0.002 n=6+6) name old allocs/op new allocs/op delta CodeDecoder-8 77.5k ± 0% 77.5k ± 0% +0.00% (p=0.002 n=6+6) Finally, make all of these benchmarks report allocs by default. The decoder ones are pretty sensitive to generated garbage, so ReportAllocs would have made the performance regression more obvious. Change-Id: I67b50f86b2e72f55539429450c67bfb1a9464b67 Reviewed-on: https://go-review.googlesource.com/c/go/+/167978Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Tobias Klauser authored
Move the shared code of IndexByte and IndexByteString into indexbytebody. This will allow to implement optimizations (e.g. for #29001) in a single function. Change-Id: I1d550da8eb65f95e492a460a12058cc35b1162b6 Reviewed-on: https://go-review.googlesource.com/c/go/+/167939 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 17 Mar, 2019 3 commits
-
-
Elias Naur authored
UserHomeDir always returns "/" for platforms where the home directory is not always well defined. However, the user might set HOME before running a Go program on those platforms and on at least iOS, HOME is actually set to something useful (the root of the app specific writable directory). This CL changes UserHomeDir to use the root directory "/" only if $HOME is empty. Change-Id: Icaa01de53cd585d527d9a23b1629375d6b7f67e9 Reviewed-on: https://go-review.googlesource.com/c/go/+/167802 Run-TryBot: Elias Naur <mail@eliasnaur.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
-
Tobias Klauser authored
Follow CL 165338 and use word-wise comparison for aligned buffers in Equal on arm, otherwise fall back to the current byte-wise comparison. name old time/op new time/op delta Equal/0-4 25.7ns ± 1% 23.5ns ± 1% -8.78% (p=0.000 n=10+10) Equal/1-4 65.8ns ± 0% 60.1ns ± 1% -8.69% (p=0.000 n=10+9) Equal/6-4 82.9ns ± 1% 86.7ns ± 0% +4.59% (p=0.000 n=10+10) Equal/9-4 90.0ns ± 0% 101.0ns ± 0% +12.18% (p=0.000 n=9+10) Equal/15-4 108ns ± 0% 119ns ± 0% +10.19% (p=0.000 n=8+8) Equal/16-4 111ns ± 0% 82ns ± 0% -26.37% (p=0.000 n=8+10) Equal/20-4 124ns ± 1% 87ns ± 1% -29.94% (p=0.000 n=9+10) Equal/32-4 160ns ± 1% 97ns ± 1% -39.40% (p=0.000 n=10+10) Equal/4K-4 14.0µs ± 0% 3.6µs ± 1% -74.57% (p=0.000 n=9+10) Equal/4M-4 12.8ms ± 1% 3.2ms ± 0% -74.93% (p=0.000 n=9+9) Equal/64M-4 204ms ± 1% 51ms ± 0% -74.78% (p=0.000 n=10+10) EqualPort/1-4 47.0ns ± 1% 46.8ns ± 0% -0.40% (p=0.015 n=10+6) EqualPort/6-4 82.6ns ± 1% 81.9ns ± 1% -0.87% (p=0.002 n=10+10) EqualPort/32-4 232ns ± 0% 232ns ± 0% ~ (p=0.496 n=8+10) EqualPort/4K-4 29.0µs ± 1% 29.0µs ± 1% ~ (p=0.604 n=9+10) EqualPort/4M-4 24.0ms ± 1% 23.8ms ± 0% -0.65% (p=0.001 n=9+9) EqualPort/64M-4 383ms ± 1% 382ms ± 0% ~ (p=0.218 n=10+10) CompareBytesEqual-4 61.2ns ± 1% 61.0ns ± 1% ~ (p=0.539 n=10+10) name old speed new speed delta Equal/1-4 15.2MB/s ± 0% 16.6MB/s ± 1% +9.52% (p=0.000 n=10+9) Equal/6-4 72.4MB/s ± 1% 69.2MB/s ± 0% -4.40% (p=0.000 n=10+10) Equal/9-4 100MB/s ± 0% 89MB/s ± 0% -11.40% (p=0.000 n=9+10) Equal/15-4 138MB/s ± 1% 125MB/s ± 1% -9.41% (p=0.000 n=10+10) Equal/16-4 144MB/s ± 1% 196MB/s ± 0% +36.41% (p=0.000 n=10+10) Equal/20-4 162MB/s ± 1% 231MB/s ± 1% +42.98% (p=0.000 n=9+10) Equal/32-4 200MB/s ± 1% 331MB/s ± 1% +65.64% (p=0.000 n=10+10) Equal/4K-4 292MB/s ± 0% 1149MB/s ± 1% +293.19% (p=0.000 n=9+10) Equal/4M-4 328MB/s ± 1% 1307MB/s ± 0% +298.87% (p=0.000 n=9+9) Equal/64M-4 329MB/s ± 1% 1306MB/s ± 0% +296.56% (p=0.000 n=10+10) EqualPort/1-4 21.3MB/s ± 1% 21.4MB/s ± 0% +0.42% (p=0.002 n=10+9) EqualPort/6-4 72.6MB/s ± 1% 73.2MB/s ± 1% +0.87% (p=0.003 n=10+10) EqualPort/32-4 138MB/s ± 0% 138MB/s ± 0% ~ (p=0.953 n=9+10) EqualPort/4K-4 141MB/s ± 1% 141MB/s ± 1% ~ (p=0.382 n=10+10) EqualPort/4M-4 175MB/s ± 1% 176MB/s ± 0% +0.65% (p=0.001 n=9+9) EqualPort/64M-4 175MB/s ± 1% 176MB/s ± 0% ~ (p=0.225 n=10+10) The 5-12% decrease in performance on Equal/{6,9,15} are due to the benchmarks splitting the bytes buffer in half. The b argument to Equal then ends up being unaligned and thus the fast word-wise compare doesn't kick in. Updates #29001 Change-Id: I73be501c18e67d211ed19da7771b4f254254e609 Reviewed-on: https://go-review.googlesource.com/c/go/+/167557 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
Elias Naur authored
Now that modules are always on, cmd/go tests require a valid GOCACHE. However, on iOS where the go tool is not available, the cmd/go test driver ends up setting GOCACHE to the empty string. Fix it by falling back to the builtin default cache directory. The iOS exec wrapper passes the environment variables to the app on the device, including $HOME used for the default cache directory. Skip $HOME to let the device specific and writable $HOME be used instead. Should fix cmd/go on the iOS builders that broke when GO111MODULE defaulted to on. Change-Id: I0939f5b8aaa1d2db95e64c99f4130eee2d0b4d4d Reviewed-on: https://go-review.googlesource.com/c/go/+/167938 Run-TryBot: Elias Naur <mail@eliasnaur.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 16 Mar, 2019 1 commit
-
-
Richard Musiol authored
Testing Examples for js/wasm is supported as of ac56baa0, so we can reenable them. This reverts CL 119377 (commit 9a917130). Fixes #25933 Change-Id: I0f228a3ec385dbe9573d3c33e42dccd4488d7152 Reviewed-on: https://go-review.googlesource.com/c/go/+/167800Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-