- 03 Oct, 2019 4 commits
-
-
Utkarsh Dixit authored
Change-Id: If657dab2df19d3b0c2ff9869a64e3a97446646ac GitHub-Last-Rev: b921b01cf4e5bcbbc65fb1fb0b5cd836bda73596 GitHub-Pull-Request: golang/go#34637 Reviewed-on: https://go-review.googlesource.com/c/go/+/198041Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
-
Robert Griesemer authored
Fixes #33753. Updates #31747. Change-Id: Icc42b23405ead4f7f17b0ffa3611405454b6b271 Reviewed-on: https://go-review.googlesource.com/c/go/+/198491 Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Matthew Dempsky authored
Prepared with gofmt -r. Change-Id: Ifea325c209d800b5692d318955930b10debb548b Reviewed-on: https://go-review.googlesource.com/c/go/+/198494 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Ariel Mashraki authored
This CL is a follow up for 198080. Added a private writeTo method to the Node interface, in order to use the same builder for printing all nodes in the tree. Benchmark output against master: benchmark old ns/op new ns/op delta BenchmarkParseLarge-8 24594994 25292054 +2.83% BenchmarkVariableString-8 117 118 +0.85% BenchmarkListString-8 10475 3353 -67.99% benchmark old allocs new allocs delta BenchmarkVariableString-8 3 3 +0.00% BenchmarkListString-8 149 31 -79.19% benchmark old bytes new bytes delta BenchmarkVariableString-8 72 72 +0.00% BenchmarkListString-8 5698 1608 -71.78% Change-Id: I2b1cf07cda65c1b80083fb99671289423700feba Reviewed-on: https://go-review.googlesource.com/c/go/+/198278Reviewed-by: Rob Pike <r@golang.org> Run-TryBot: Rob Pike <r@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 02 Oct, 2019 10 commits
-
-
Michael Hendricks authored
If a request for a PTR record returned a response with a non-PTR answer, goLookupPTR would loop forever. Skipping non-PTR answers guarantees progress through the DNS response. Fixes #34660 Change-Id: I56f9d21e5342d07e7d843d253267e93a29707904 Reviewed-on: https://go-review.googlesource.com/c/go/+/198460 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Egon Elbre authored
Currently cgoCheckPointer is only used with one optional argument. Using a slice for the optional arguments is quite expensive, hence replace it with a single interface{}. This results in ~30% improvement. When checking struct fields, they quite often end up being without pointers. Check this before calling cgoCheckPointer, which results in additional ~20% improvement. Inline some p == nil checks from cgoIsGoPointer which gives additional ~15% improvement. All of this translates to: name old time/op new time/op delta CgoCall/add-int-32 46.9ns ± 1% 46.6ns ± 1% -0.75% (p=0.000 n=18+20) CgoCall/one-pointer-32 143ns ± 1% 87ns ± 1% -38.96% (p=0.000 n=20+20) CgoCall/eight-pointers-32 767ns ± 0% 327ns ± 1% -57.30% (p=0.000 n=18+16) CgoCall/eight-pointers-nil-32 110ns ± 1% 89ns ± 2% -19.10% (p=0.000 n=19+19) CgoCall/eight-pointers-array-32 5.09µs ± 1% 3.56µs ± 2% -30.09% (p=0.000 n=19+19) CgoCall/eight-pointers-slice-32 3.92µs ± 0% 2.57µs ± 2% -34.48% (p=0.000 n=20+20) Change-Id: I2aa9f5ae8962a9a41a7fb1db0c300893109d0d75 Reviewed-on: https://go-review.googlesource.com/c/go/+/198081 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
W. Trevor King authored
Because errors like: certificate has expired or is not yet valid make it difficult to distinguish between "certificate has expired" and "my local clock is skewed". Including our idea of the local time makes it easier to identify the clock-skew case, and including the violated certificate constraint saves folks the trouble of looking it up in the target certificate. Change-Id: I52e0e71705ee36f6afde1bb5a47b9b42ed5ead5b GitHub-Last-Rev: db2ca4029c1e0b17363772d9824e3042d5501d48 GitHub-Pull-Request: golang/go#34646 Reviewed-on: https://go-review.googlesource.com/c/go/+/198046Reviewed-by: Filippo Valsorda <filippo@golang.org> Run-TryBot: Filippo Valsorda <filippo@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Dan Scales authored
Add a test that causes generation of arch.ZeroRange calls of various sizes 8-136 bytes in the compiler. This is to test that ZeroRanges of various sizes actually compile on different architectures, but is not testing runtime correctness (which is hard to do). Updates #34604 Change-Id: I4131eb86669bdfe8d4e36f4ae5c2a7b069abd6c4 Reviewed-on: https://go-review.googlesource.com/c/go/+/198045 Run-TryBot: Dan Scales <danscales@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
Brad Fitzpatrick authored
Fixes #34640 Change-Id: I4a6c9414fe369cd5e9915472331c4bd8a21d8b0e Reviewed-on: https://go-review.googlesource.com/c/go/+/198457Reviewed-by: Filippo Valsorda <filippo@golang.org>
-
Ruixin(Peter) Bao authored
SSA rule have already been added previously to intrisinfy Mul/Mul64 on s390x. In this CL, we want to let mulWW use that SSA rule as well. Also removed an extra line for formatting. Benchmarks: QuoRem-18 3.59µs ±15% 2.94µs ± 3% -18.06% (p=0.000 n=8+8) ModSqrt225_Tonelli-18 806µs ± 0% 800µs ± 0% -0.85% (p=0.000 n=7+8) ModSqrt225_3Mod4-18 245µs ± 1% 243µs ± 0% -0.81% (p=0.001 n=8+8) ModSqrt231_Tonelli-18 837µs ± 0% 834µs ± 1% -0.36% (p=0.028 n=8+8) ModSqrt231_5Mod8-18 282µs ± 0% 280µs ± 0% -0.76% (p=0.000 n=8+8) Sqrt-18 45.8µs ± 2% 38.6µs ± 0% -15.63% (p=0.000 n=8+8) IntSqr/1-18 19.1ns ± 0% 13.1ns ± 0% -31.41% (p=0.000 n=8+8) IntSqr/2-18 48.3ns ± 2% 48.2ns ± 0% ~ (p=0.094 n=8+8) IntSqr/3-18 70.5ns ± 1% 70.7ns ± 0% ~ (p=0.428 n=8+8) IntSqr/5-18 119ns ± 1% 118ns ± 0% -1.02% (p=0.000 n=7+8) IntSqr/8-18 215ns ± 1% 215ns ± 0% ~ (p=0.320 n=8+7) IntSqr/10-18 302ns ± 1% 301ns ± 0% ~ (p=0.148 n=8+7) IntSqr/20-18 952ns ± 1% 807ns ± 0% -15.28% (p=0.000 n=8+8) IntSqr/30-18 1.74µs ± 0% 1.53µs ± 0% -11.93% (p=0.000 n=8+8) IntSqr/50-18 3.91µs ± 0% 3.57µs ± 0% -8.64% (p=0.000 n=7+8) IntSqr/80-18 8.66µs ± 1% 8.11µs ± 0% -6.39% (p=0.000 n=8+8) IntSqr/100-18 12.8µs ± 0% 12.2µs ± 0% -5.19% (p=0.000 n=8+8) IntSqr/200-18 46.0µs ± 0% 44.5µs ± 0% -3.06% (p=0.000 n=8+8) IntSqr/300-18 81.4µs ± 0% 78.4µs ± 0% -3.71% (p=0.000 n=7+8) IntSqr/500-18 212µs ± 1% 206µs ± 0% -2.66% (p=0.000 n=8+8) IntSqr/800-18 419µs ± 1% 406µs ± 0% -3.07% (p=0.000 n=8+8) IntSqr/1000-18 635µs ± 0% 621µs ± 0% -2.13% (p=0.000 n=8+8) Change-Id: Ib097857186932b902601ab087cbeff3fc9555c3e Reviewed-on: https://go-review.googlesource.com/c/go/+/197639 Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Michael Munday authored
Control values are used to choose which successor of a block is jumped to. Typically a control value takes the form of a 'flags' value that represents the result of a comparison. Some architectures however use a variable in a register as a control value. Up until now we have managed with a single control value per block. However some architectures (e.g. s390x and riscv64) have combined compare-and-branch instructions that take two variables in registers as parameters. To generate these instructions we need to support 2 control values per block. This CL allows up to 2 control values to be used in a block in order to support the addition of compare-and-branch instructions. I have implemented s390x compare-and-branch instructions in a different CL. Passes toolstash-check -all. Results of compilebench: name old time/op new time/op delta Template 208ms ± 1% 209ms ± 1% ~ (p=0.289 n=20+20) Unicode 83.7ms ± 1% 83.3ms ± 3% -0.49% (p=0.017 n=18+18) GoTypes 748ms ± 1% 748ms ± 0% ~ (p=0.460 n=20+18) Compiler 3.47s ± 1% 3.48s ± 1% ~ (p=0.070 n=19+18) SSA 11.5s ± 1% 11.7s ± 1% +1.64% (p=0.000 n=19+18) Flate 130ms ± 1% 130ms ± 1% ~ (p=0.588 n=19+20) GoParser 160ms ± 1% 161ms ± 1% ~ (p=0.211 n=20+20) Reflect 465ms ± 1% 467ms ± 1% +0.42% (p=0.007 n=20+20) Tar 184ms ± 1% 185ms ± 2% ~ (p=0.087 n=18+20) XML 253ms ± 1% 253ms ± 1% ~ (p=0.377 n=20+18) LinkCompiler 769ms ± 2% 774ms ± 2% ~ (p=0.070 n=19+19) ExternalLinkCompiler 3.59s ±11% 3.68s ± 6% ~ (p=0.072 n=20+20) LinkWithoutDebugCompiler 446ms ± 5% 454ms ± 3% +1.79% (p=0.002 n=19+20) StdCmd 26.0s ± 2% 26.0s ± 2% ~ (p=0.799 n=20+20) name old user-time/op new user-time/op delta Template 238ms ± 5% 240ms ± 5% ~ (p=0.142 n=20+20) Unicode 105ms ±11% 106ms ±10% ~ (p=0.512 n=20+20) GoTypes 876ms ± 2% 873ms ± 4% ~ (p=0.647 n=20+19) Compiler 4.17s ± 2% 4.19s ± 1% ~ (p=0.093 n=20+18) SSA 13.9s ± 1% 14.1s ± 1% +1.45% (p=0.000 n=18+18) Flate 145ms ±13% 146ms ± 5% ~ (p=0.851 n=20+18) GoParser 185ms ± 5% 188ms ± 7% ~ (p=0.174 n=20+20) Reflect 534ms ± 3% 538ms ± 2% ~ (p=0.105 n=20+18) Tar 215ms ± 4% 211ms ± 9% ~ (p=0.079 n=19+20) XML 295ms ± 6% 295ms ± 5% ~ (p=0.968 n=20+20) LinkCompiler 832ms ± 4% 837ms ± 7% ~ (p=0.707 n=17+20) ExternalLinkCompiler 1.58s ± 8% 1.60s ± 4% ~ (p=0.296 n=20+19) LinkWithoutDebugCompiler 478ms ±12% 489ms ±10% ~ (p=0.429 n=20+20) name old object-bytes new object-bytes delta Template 559kB ± 0% 559kB ± 0% ~ (all equal) Unicode 216kB ± 0% 216kB ± 0% ~ (all equal) GoTypes 2.03MB ± 0% 2.03MB ± 0% ~ (all equal) Compiler 8.07MB ± 0% 8.07MB ± 0% -0.06% (p=0.000 n=20+20) SSA 27.1MB ± 0% 27.3MB ± 0% +0.89% (p=0.000 n=20+20) Flate 343kB ± 0% 343kB ± 0% ~ (all equal) GoParser 441kB ± 0% 441kB ± 0% ~ (all equal) Reflect 1.36MB ± 0% 1.36MB ± 0% ~ (all equal) Tar 487kB ± 0% 487kB ± 0% ~ (all equal) XML 632kB ± 0% 632kB ± 0% ~ (all equal) name old export-bytes new export-bytes delta Template 18.5kB ± 0% 18.5kB ± 0% ~ (all equal) Unicode 7.92kB ± 0% 7.92kB ± 0% ~ (all equal) GoTypes 35.0kB ± 0% 35.0kB ± 0% ~ (all equal) Compiler 109kB ± 0% 110kB ± 0% +0.72% (p=0.000 n=20+20) SSA 137kB ± 0% 138kB ± 0% +0.58% (p=0.000 n=20+20) Flate 4.89kB ± 0% 4.89kB ± 0% ~ (all equal) GoParser 8.49kB ± 0% 8.49kB ± 0% ~ (all equal) Reflect 11.4kB ± 0% 11.4kB ± 0% ~ (all equal) Tar 10.5kB ± 0% 10.5kB ± 0% ~ (all equal) XML 16.7kB ± 0% 16.7kB ± 0% ~ (all equal) name old text-bytes new text-bytes delta HelloSize 761kB ± 0% 761kB ± 0% ~ (all equal) CmdGoSize 10.8MB ± 0% 10.8MB ± 0% ~ (all equal) name old data-bytes new data-bytes delta HelloSize 10.7kB ± 0% 10.7kB ± 0% ~ (all equal) CmdGoSize 312kB ± 0% 312kB ± 0% ~ (all equal) name old bss-bytes new bss-bytes delta HelloSize 122kB ± 0% 122kB ± 0% ~ (all equal) CmdGoSize 146kB ± 0% 146kB ± 0% ~ (all equal) name old exe-bytes new exe-bytes delta HelloSize 1.13MB ± 0% 1.13MB ± 0% ~ (all equal) CmdGoSize 15.1MB ± 0% 15.1MB ± 0% ~ (all equal) Change-Id: I3cc2f9829a109543d9a68be4a21775d2d3e9801f Reviewed-on: https://go-review.googlesource.com/c/go/+/196557 Run-TryBot: Michael Munday <mike.munday@ibm.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Daniel Martí <mvdan@mvdan.cc> Reviewed-by: Keith Randall <khr@golang.org>
-
Jason A. Donenfeld authored
CL 196846 implemented memory mapped output files but forgot to provide an implementation for Msync. This rectifies that with a simple call to FlushViewOfFile. Change-Id: I5aebef9baf3a2a6ad54ceda096952a5d7d660bfe Reviewed-on: https://go-review.googlesource.com/c/go/+/198418 Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com> Reviewed-by: Alex Brainman <alex.brainman@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Kyohei Kadota authored
TestEnvOverride sets PATH to /wibble before executing a CGI. So customized Perl that is starting with '#!/usr/bin/env bash' will fail because /usr/bin/env can't lookup bash. Fixes #27790 Change-Id: I25e433061a7ff9da8c86429e934418fc15f12f90 Reviewed-on: https://go-review.googlesource.com/c/go/+/196845Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Emmanuel T Odeke authored
By lazily starting the signal watch loop only on Notify, we are able to have deadlock detection even when "os/signal" is imported. Thanks to Ian Lance Taylor for the solution and discussion. With this change in, fix a runtime gorountine count test that assumed that os/signal.init would unconditionally start the signal watching goroutine, but alas no more. Fixes #21576. Change-Id: I6eecf82a887f59f2ec8897f1bcd67ca311ca42ff Reviewed-on: https://go-review.googlesource.com/c/go/+/101036 Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 01 Oct, 2019 12 commits
-
-
Bryan C. Mills authored
In #33848, we propose to use 'go 1.14' in the go.mod file to enable new default behavior. That means that 'go mod init' needs to start generating that directive by default, which requires the presence of the updated version tag in the build environment. Updates #33848 Change-Id: I9f3b8845fdfd843fd76de32f4b55d8f765d691de Reviewed-on: https://go-review.googlesource.com/c/go/+/198318 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
-
Ariel Mashraki authored
nextNonSpace has an identical code except the call to backup at the end. Change-Id: Iefa5b13950007da38323a800fb6b0ce3d436254b Reviewed-on: https://go-review.googlesource.com/c/go/+/198277 Run-TryBot: Rob Pike <r@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rob Pike <r@golang.org>
-
Ariel Mashraki authored
This CL is a continuation of 198078. Benchmark output: benchmark old ns/op new ns/op delta BenchmarkParseLarge-8 24759165 24516563 -0.98% BenchmarkVariableString-8 115 115 +0.00% BenchmarkListString-8 924 680 -26.41% benchmark old allocs new allocs delta BenchmarkVariableString-8 3 3 +0.00% BenchmarkListString-8 14 13 -7.14% benchmark old bytes new bytes delta BenchmarkVariableString-8 72 72 +0.00% BenchmarkListString-8 512 424 -17.19% Change-Id: I9ec48fe4832437c556a5fa94d4cbf6e29e28d944 Reviewed-on: https://go-review.googlesource.com/c/go/+/198080Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com> Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Clément Chigot authored
ADUFFCOPY and ADUFFZERO instructions weren't handled by rewriteToUseTOC. These instructions are considered as a simple branch except with -dynlink where they become an indirect call. Fixes #34604 Change-Id: I16ca6a152164966fb9cbf792219a8a39aad2b53b Reviewed-on: https://go-review.googlesource.com/c/go/+/197842Reviewed-by: Cherry Zhang <cherryyz@google.com> Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Nuno Cruces authored
Change applies to sendFile. This is already done for sendContent. Change-Id: If43d9ab99e6e66a1363b08e0bdcceb57df1f855c GitHub-Last-Rev: 1c47620a09a6f5e2b3d777fadaad6e0189de4af5 GitHub-Pull-Request: golang/go#34631 Reviewed-on: https://go-review.googlesource.com/c/go/+/198139Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Andrew Bonventre authored
This reverts CL 186417. Reason for revert: Broke darwin (10_14), linux (ppc), aix (ppc) Updates #33139 Change-Id: I8bf3c817a96a0e57e45754a097cea7062b2fcdfd Reviewed-on: https://go-review.googlesource.com/c/go/+/198177 Run-TryBot: Andrew Bonventre <andybons@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
-
Alex Brainman authored
CL 170738 used mmap for writing most of the output file content. This change implements similar functionality for Windows. The output of compilebench -count=5 command before and after this change name old time/op new time/op delta Template 254ms ±14% 239ms ±10% ~ (p=0.222 n=5+5) Unicode 119ms ±14% 113ms ±12% ~ (p=0.421 n=5+5) GoTypes 892ms ±23% 850ms ± 1% ~ (p=0.841 n=5+5) Compiler 3.86s ± 2% 3.82s ± 1% ~ (p=0.222 n=5+5) SSA 12.6s ± 1% 12.6s ± 1% ~ (p=0.095 n=5+5) Flate 162ms ±18% 149ms ± 1% -7.91% (p=0.016 n=5+5) GoParser 199ms ±12% 184ms ± 1% ~ (p=0.056 n=5+5) Reflect 524ms ±13% 507ms ± 3% ~ (p=0.421 n=5+5) Tar 207ms ± 7% 198ms ± 0% -4.58% (p=0.016 n=5+4) XML 305ms ± 6% 299ms ± 5% ~ (p=0.690 n=5+5) LinkCompiler 1.14s ±11% 1.14s ± 3% ~ (p=0.222 n=5+5) ExternalLinkCompiler 2.80s ± 5% 2.92s ±13% ~ (p=0.222 n=5+5) LinkWithoutDebugCompiler 727ms ± 2% 750ms ± 7% ~ (p=0.151 n=5+5) StdCmd 44.0s ± 8% 43.3s ± 2% ~ (p=1.000 n=5+5) name old user-time/op new user-time/op delta Template 300ms ±27% 259ms ±34% ~ (p=0.341 n=5+5) Unicode 134ms ±51% 144ms ±67% ~ (p=0.548 n=5+5) GoTypes 1.05s ±10% 1.03s ± 6% ~ (p=0.968 n=5+5) Compiler 5.01s ± 3% 4.88s ± 3% ~ (p=0.286 n=5+5) SSA 16.8s ± 1% 16.7s ± 1% -0.95% (p=0.008 n=5+5) Flate 178ms ±67% 181ms ±38% ~ (p=0.849 n=5+5) GoParser 231ms ±32% 219ms ±21% ~ (p=0.810 n=5+5) Reflect 634ms ±33% 650ms ± 6% ~ (p=0.135 n=5+5) Tar 219ms ±36% 231ms ±19% ~ (p=0.905 n=5+5) XML 378ms ±20% 366ms ±23% ~ (p=0.913 n=5+5) LinkCompiler 1.34s ±15% 1.32s ±10% ~ (p=0.730 n=5+5) ExternalLinkCompiler 1.22s ±13% 1.18s ±15% ~ (p=0.873 n=5+5) LinkWithoutDebugCompiler 847ms ±13% 841ms ±21% ~ (p=0.667 n=5+5) name old text-bytes new text-bytes delta HelloSize 767kB ± 0% 767kB ± 0% ~ (all equal) CmdGoSize 10.6MB ± 0% 10.6MB ± 0% ~ (all equal) name old data-bytes new data-bytes delta HelloSize 10.1kB ± 0% 10.1kB ± 0% ~ (all equal) CmdGoSize 310kB ± 0% 310kB ± 0% ~ (all equal) name old bss-bytes new bss-bytes delta HelloSize 0.00B 0.00B ~ (all equal) CmdGoSize 0.00B 0.00B ~ (all equal) name old exe-bytes new exe-bytes delta HelloSize 1.10MB ± 0% 1.10MB ± 0% ~ (all equal) CmdGoSize 14.7MB ± 0% 14.7MB ± 0% ~ (all equal) Change-Id: I653f63213b9cc8a4b05f71938e34b5d53b05e3f5 Reviewed-on: https://go-review.googlesource.com/c/go/+/196846 Run-TryBot: Alex Brainman <alex.brainman@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com>
-
Ariel Mashraki authored
As mentioned in godoc, strings.Builder is more efficient for concatenating and building strings. Running a simple bench test on VariableNode.String() gives: benchmark old ns/op new ns/op delta BenchmarkParseLarge-8 25676831 24453285 -4.77% BenchmarkVariableString-8 296 115 -61.15% benchmark old allocs new allocs delta BenchmarkVariableString-8 8 3 -62.50% benchmark old bytes new bytes delta BenchmarkVariableString-8 112 72 -35.71% Change-Id: I13c9340080738fcad1edeed859d33ba608e4b05a Reviewed-on: https://go-review.googlesource.com/c/go/+/198078Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com> Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Shenghou Ma authored
While understanding why syscall.Read is 2x slower on darwin/amd64, I found out that, contrary to popular belief, the slowdown is not due to the migration to use libSystem.dylib instead of direct SYSCALLs, i.e., CL 141639 (and #17490), but due to a subtle change introduced in CL 141639. Previously, syscall.Read used syscall.Syscall(SYS_READ), whose preamble called runtime.entersyscall, but after CL 141639, syscall.Read changes to call runtime.syscall_syscall instead, which in turn calls runtime.entersyscallblock instead of runtime.entersyscall. And the entire 2x slow down can be attributed to this change. I think this is unnecessary as even though syscalls like Read might block, it does not always block, so there is no need to handoff P proactively for each Read. Additionally, we have been fine with not handing off P for each Read prior to Go 1.12, so we probably don't need to change it. This changes restores the pre-Go 1.12 behavior, where syscall preamble uses runtime.entersyscall, and we rely on sysmon to take P back from g blocked in syscalls. Change-Id: If76e97b5a7040cf1c10380a567c4f5baec3121ba Reviewed-on: https://go-review.googlesource.com/c/go/+/197938 Run-TryBot: Minux Ma <minux@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Andrew Bonventre authored
The new yaml.v2 release broke the longtest builder. Update the expected data. Updates #28856 Change-Id: I98ec9e32e55bdb6b26b67e46dc16f34f77c2d40f Reviewed-on: https://go-review.googlesource.com/c/go/+/198117Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
-
John Papandriopoulos authored
Fix linking with a package having a .syso file in external link mode, that would otherwise cause an error before executing the external linker because it can't find symbols that are exported in the said .syso file. Fixes #33139 Change-Id: Id3ee737fba1c6f1e37910593dfedf9c84486d398 Reviewed-on: https://go-review.googlesource.com/c/go/+/186417Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Rob Pike authored
Followup to https://golang.org/cl/197997 If you know the number of elements, you don't need append at all. Either use append to grow, or allocate and index. Here we choose number 2. Change-Id: Ic58637231789640ff7b293ece04a95a8de7ccf8f Reviewed-on: https://go-review.googlesource.com/c/go/+/198097Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 30 Sep, 2019 10 commits
-
-
Matthew Dempsky authored
When comparing two T-typed values t1 and t2 using the T_eq function, we used to generate: pl := &t1 pr := &t2 return T_eq(pl, pr, unsafe.Sizeof(T{})) This CL changes it to simply generate: return T_eq(&t1, &t2, unsafe.Sizeof(T{})) Surprisingly, this does not pass toolstash. For some reason, it seems like SSA wasn't able to SSA-ify the pl and pr variables in all cases. Change-Id: I111fbb068a1741fa169c9922cb8cdb6e21579aa4 Reviewed-on: https://go-review.googlesource.com/c/go/+/197601 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Matthew Dempsky authored
walkcompare already called walkexpr on n.Left and n.Right, which in turn calls anylit when appropriate. Passes toolstash-check. Change-Id: I6912ac5a42b977c04db9d85cb2e7295e275e083d Reviewed-on: https://go-review.googlesource.com/c/go/+/197600 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Pantelis Sampaziotis authored
The required vars slice capacity is known so it can be specified before appending. Change-Id: Ifa2fe97602e84198c4d01e5a1b0529f3f65f2df1 GitHub-Last-Rev: a0580df208a1d498968138d63508ae4e30df2ec5 GitHub-Pull-Request: golang/go#34613 Reviewed-on: https://go-review.googlesource.com/c/go/+/197997Reviewed-by: Andrew Bonventre <andybons@golang.org>
-
An Xiao authored
This change updates the use of quotation marks by replacing `ones' with 'ones'. Quotation like `this' should not be used any more according to https://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html Change-Id: I58470cdcc207864fbc8ca68ec0e77329bd81dc19 GitHub-Last-Rev: d03c81ebfba19a98a8dcc99451db60d129b43784 GitHub-Pull-Request: golang/go#33719 Reviewed-on: https://go-review.googlesource.com/c/go/+/190817Reviewed-by: Andrew Bonventre <andybons@golang.org>
-
chauncyc authored
Change-Id: Ifbdf33ee4e413c3edba59b7dbed00ab90698cd35 GitHub-Last-Rev: c3bd33c4cf9c4f4a1e6724c93b865fc5bbb4ca9d GitHub-Pull-Request: golang/go#34277 Reviewed-on: https://go-review.googlesource.com/c/go/+/195157 Run-TryBot: Andrew Bonventre <andybons@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Andrew Bonventre <andybons@golang.org> Reviewed-by: Filippo Valsorda <filippo@golang.org>
-
Pantelis Sampaziotis authored
Updates #30322 This change adds the Unwrap method to NumError. NumError is the only custom error type of the strconv that has a nested exported error. Change-Id: I8774886348880365a83f72a1d106276def27dffe GitHub-Last-Rev: 712f3df8842f48f988cebfc527476781a7cf7140 GitHub-Pull-Request: golang/go#34213 Reviewed-on: https://go-review.googlesource.com/c/go/+/194563 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
-
Tobias Klauser authored
Update the list of expected "id" outputs in TestGroupCleanupUserNamespace with SELinux context information as used on CentOS. Fixes #34547 Change-Id: I426bbe2d04e2039c87490362a1891ec3de6e36e0 Reviewed-on: https://go-review.googlesource.com/c/go/+/197841 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Carlo Alberto Ferraris authored
This allows to inline the common case in which the Source is a rngSource. On linux/amd64 in a VM: name old time/op new time/op delta Read3-4 33.8ns ± 8% 18.5ns ± 8% -45.38% (p=0.000 n=10+10) Read64-4 371ns ± 8% 70ns ± 7% -81.00% (p=0.000 n=10+10) Read1000-4 5.33µs ± 5% 0.86µs ± 3% -83.85% (p=0.000 n=9+9) Change-Id: Ibf47b0e9ecdfe62ffcb66d6a92f191800bdc740e Reviewed-on: https://go-review.googlesource.com/c/go/+/191539Reviewed-by: Daniel Martí <mvdan@mvdan.cc> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Richard Musiol authored
This change adds the method Value.Delete, which implements JavaScript's "delete" operator for deleting properties. Fixes #33079. Change-Id: Ia5b190240bd59daca48094fcbc32f8d0a06f19d5 Reviewed-on: https://go-review.googlesource.com/c/go/+/197840 Run-TryBot: Richard Musiol <neelance@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
Julien Schmidt authored
The required slice capacity is already known. Thus, preallocate a slice with the correct capacity before appending to it. Change-Id: I45ac2c5f1701caeb3dda20451d371713ae7e7365 GitHub-Last-Rev: 2bf575be65e9a449322540270988eaf87cec4245 GitHub-Pull-Request: golang/go#34602 Reviewed-on: https://go-review.googlesource.com/c/go/+/197917Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 29 Sep, 2019 3 commits
-
-
Carlo Alberto Ferraris authored
Avoid interface calls, enable inlining, and store the rngSource close to the Mutex to exploit better memory locality. Also add a benchmark to properly measure the threadsafe nature of globalRand. On a linux/amd64 VM: name old time/op new time/op delta Int63Threadsafe-4 36.4ns ±12% 20.6ns ±11% -43.52% (p=0.000 n=30+30) Int63ThreadsafeParallel-4 79.3ns ± 5% 56.5ns ± 5% -28.69% (p=0.000 n=29+30) Change-Id: I6ab912c1a1e9afc7bacd8e72c82d4d50d546a510 Reviewed-on: https://go-review.googlesource.com/c/go/+/191538Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com> Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Richard Musiol authored
This change adds an optional "producer" section that reports the source language and compiler version. See https://github.com/WebAssembly/tool-conventions/blob/master/ProducersSection.md. It also removes the now redundant "go.version" section. Fixes #33295. Change-Id: Ib4c80528728caf9e524fbd3f26822cbbc8b05a75 Reviewed-on: https://go-review.googlesource.com/c/go/+/196804 Run-TryBot: Richard Musiol <neelance@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Agniva De Sarker <agniva.quicksilver@gmail.com> Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
Alberto Donizetti authored
In the GOPATH section of the 'How To Write Go Code' document, it is mentioned two times in the span of a few lines that one can set GOPATH to a custom workspace path. The two paragraphs say basically the same thing, and they both link to golang.org/wiki/SettingGOPATH, so I'm quite sure the duplication is not intentional. This change deletes the second occurrence. Change-Id: I16f8bb8657041a23ed272eacf9adbc5637e8e34a Reviewed-on: https://go-review.googlesource.com/c/go/+/197839Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
-
- 28 Sep, 2019 1 commit
-
-
Alberto Donizetti authored
CL 197817 replaced a use of n.Rlist with n.Right in a Fprintf call, but it left the corresponding format as %.v, which broke the TestFormats test on the longtest builder. Since with n.Right is custom to use %v (and not %.v), replace the format with %v. Fixes the longtest builder. Change-Id: Icf5bf820a936c51e633c25ada1a71a1ffb6d28c2 Reviewed-on: https://go-review.googlesource.com/c/go/+/197837 Run-TryBot: Alberto Donizetti <alb.donizetti@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-