- 24 Mar, 2016 6 commits
-
-
Tilman Dilo authored
Ignore superfluous trailing IDAT chunks which were not consumed when decoding the image. This change fixes decoding of valid images in which a zero-length IDAT chunk appears after the actual image data. It also prevents decoding of trailing garbage IDAT chunks or maliciously embedded additional images. Fixes #14936 Change-Id: I8c76cfa9a03496d9576f72bed2db109271f97c5e Reviewed-on: https://go-review.googlesource.com/21045Reviewed-by: Nigel Tao <nigeltao@golang.org>
-
Yasuhiro Matsumoto authored
If name is /dev/{stdin,stdout,stderr}, return fileInfo. Fixes #14853. Change-Id: Ibf7d1ae7b9f3dc43f6ed7c905ea2c5102e1971cc Reviewed-on: https://go-review.googlesource.com/20845Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
-
Mohit Agarwal authored
Fixes #13996 Change-Id: I9b2c7fba0705900aca9a70bc6a2687667a9a976c Reviewed-on: https://go-review.googlesource.com/20128Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Dave Cheney authored
Remove almost all the remaining Nod(OXXX, ... ) uses. The performance change is due entirely to the changes to func temp(*Type). The other cleanups have no effect, as expected. I'll address the remaining Nod(OXXX, ...) uses in a followup CL as they are very sensitive to change. lucky(~/go/src/cmd/compile) % benchstat /tmp/{old,new}.txt name old time/op new time/op delta Template 391ms ± 6% 385ms ± 6% ~ (p=0.127 n=19+20) GoTypes 1.27s ± 2% 1.27s ± 2% ~ (p=0.172 n=19+19) Compiler 6.17s ± 2% 6.15s ± 2% ~ (p=0.647 n=19+20) name old alloc/op new alloc/op delta Template 63.7MB ± 0% 63.4MB ± 0% -0.35% (p=0.000 n=16+20) GoTypes 219MB ± 0% 218MB ± 0% -0.38% (p=0.000 n=20+20) Compiler 980MB ± 0% 976MB ± 0% -0.38% (p=0.000 n=20+20) name old allocs/op new allocs/op delta Template 586k ± 0% 584k ± 0% -0.30% (p=0.000 n=20+20) GoTypes 1.80M ± 0% 1.79M ± 0% -0.31% (p=0.000 n=20+20) Compiler 7.74M ± 0% 7.71M ± 0% -0.34% (p=0.000 n=20+20) Change-Id: Ie21a5443c33a23ce30f987bdddec9fe350365d35 Reviewed-on: https://go-review.googlesource.com/21017Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Josh Bleecher Snyder authored
This is follow-up 3 of 3 to CL 20959. Passes toolstash -cmp. Change-Id: I06efded21bbc970cbefa10e8f2cac1ebc6942e1b Reviewed-on: https://go-review.googlesource.com/21054 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Josh Bleecher Snyder authored
This is follow-up 1 of 3 to CL 20959. Passes toolstash -cmp. Change-Id: I9bddf7d88333fa4755e03ff8a034a35bd01b7855 Reviewed-on: https://go-review.googlesource.com/21052 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 23 Mar, 2016 18 commits
-
-
Brad Fitzpatrick authored
Fixes #14199 Change-Id: Ic9284023b663de3db1ca7b7b1e96eeab82ec0944 Reviewed-on: https://go-review.googlesource.com/21016 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Marvin Stenger authored
This commit replaces some of for i := len(x) - 1; i >= 0; i-- {...} style loops, which do not rely on reverse iteration order. Change-Id: I5542834286562da058200c06e7a173b13760e54d Reviewed-on: https://go-review.googlesource.com/21044Reviewed-by: Keith Randall <khr@golang.org>
-
Brad Fitzpatrick authored
It's pretty hard to get reliable CPU numbers, even with 50 runs on an otherwise-idle physical Linux machine, but the garbage reduction numbers are nice. To get useful time/op numbers, I modified compilebench to report user CPU time instead of wall time: name old time/op new time/op delta Template 547ms ± 6% 557ms ± 5% +1.80% (p=0.001 n=49+49) Unicode 360ms ± 9% 365ms ± 6% ~ (p=0.094 n=50+45) GoTypes 1.84s ± 3% 1.82s ± 3% -1.50% (p=0.000 n=50+49) Compiler 9.19s ± 2% 9.02s ± 2% -1.87% (p=0.000 n=45+50) name old alloc/op new alloc/op delta Template 63.3MB ± 0% 59.1MB ± 0% -6.72% (p=0.000 n=50+50) Unicode 43.1MB ± 0% 42.9MB ± 0% -0.47% (p=0.000 n=50+49) GoTypes 220MB ± 0% 200MB ± 0% -9.00% (p=0.000 n=50+50) Compiler 1.00GB ± 0% 0.89GB ± 0% -10.09% (p=0.000 n=50+49) name old allocs/op new allocs/op delta Template 681k ± 0% 680k ± 0% -0.16% (p=0.000 n=50+48) Unicode 541k ± 0% 541k ± 0% -0.02% (p=0.011 n=48+50) GoTypes 2.08M ± 0% 2.08M ± 0% -0.19% (p=0.000 n=48+50) Compiler 9.24M ± 0% 9.23M ± 0% -0.11% (p=0.000 n=50+50) Change-Id: I1fac4ebf85a1783e3289c3ffb1ed365442837643 Reviewed-on: https://go-review.googlesource.com/20995 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Dave Cheney <dave@cheney.net> Reviewed-by: Keith Randall <khr@golang.org>
-
Matthew Dempsky authored
Get rid of (*Mpint).Add's "quiet" parameter: it's always set to 0. Inline (*Mpint).shift into (*Mpint).Lsh and (*Mpint).Rsh. There's no need for a common shift method that can handle both left or right shifts based on sign when the higher level abstractions only ever do one or the other. Change-Id: Icd3b082413f9193961b6835279e0bd4b6a6a6621 Reviewed-on: https://go-review.googlesource.com/21050 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
-
Keith Randall authored
Start working on arm port. Gets close to correct code for fibonacci: func fib(n int) int { if n < 2 { return n } return fib(n-1) + fib(n-2) } Still a lot to do, but this is a good starting point. Cleaned up some arch-specific dependencies in regalloc. Change-Id: I4301c6c31a8402168e50dcfee8bcf7aee73ea9d5 Reviewed-on: https://go-review.googlesource.com/21000Reviewed-by: David Chase <drchase@google.com>
-
David Crawshaw authored
Remove reflect type information for unexported methods that do not satisfy any interface in the program. Ideally the unexported method would not appear in the method list at all, but that is tricky because the slice is built by the compiler. Reduces binary size: cmd/go: 81KB (0.8%) jujud: 258KB (0.4%) For #6853. Change-Id: I25ef8df6907e9ac03b18689d584ea46e7d773043 Reviewed-on: https://go-review.googlesource.com/21033Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Russ Cox <rsc@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Alexandru Moșoi authored
khr: Lifting the nil check out of the loop altogether is an admirable goal, and this rewrite is one step on the way. But without lifting it out of the loop, the rewrite is just hurting us. Fixes #14917 Change-Id: Idb917f37d89f50f8e046d5ebd7c092b1e0eb0633 Reviewed-on: https://go-review.googlesource.com/21040Reviewed-by: Keith Randall <khr@golang.org> Run-TryBot: Alexandru Moșoi <alexandru@mosoi.ro> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Lynn Boger authored
The existing implementation for Equal and similar functions in the bytes package operate on one byte at at time. This performs poorly on ppc64/ppc64le especially when the byte buffers are large. This change improves those functions by loading and comparing double words where possible. The common code has been moved to a function that can be shared by the other functions in this file which perform the same type of comparison. Further optimizations are done for the case where >= 32 bytes are being compared. The new function memeqbody is used by memeq_varlen, Equal, and eqstring. When running the bytes test with -test.bench=Equal benchmark old MB/s new MB/s speedup BenchmarkEqual1 164.83 129.49 0.79x BenchmarkEqual6 563.51 445.47 0.79x BenchmarkEqual9 656.15 1099.00 1.67x BenchmarkEqual15 591.93 1024.30 1.73x BenchmarkEqual16 613.25 1914.12 3.12x BenchmarkEqual20 682.37 1687.04 2.47x BenchmarkEqual32 807.96 3843.29 4.76x BenchmarkEqual4K 1076.25 23280.51 21.63x BenchmarkEqual4M 1079.30 13120.14 12.16x BenchmarkEqual64M 1073.28 10876.92 10.13x It was determined that the degradation in the smaller byte tests were due to unfavorable code alignment of the single byte loop. Fixes #14368 Change-Id: I0dd87382c28887c70f4fbe80877a8ba03c31d7cd Reviewed-on: https://go-review.googlesource.com/20249Reviewed-by: Minux Ma <minux@golang.org>
-
Shahar Kohanim authored
Removes unnecessary fields from Pcln. Change-Id: I175049ca749b510eedaf65162355bc4d7a93315e Reviewed-on: https://go-review.googlesource.com/21041Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Klaus Post authored
This changes how matching is done in deflate algorithm. The major change is that we do not look for matches that are only 3 bytes in length, matches must be 4 bytes at least. Contrary to what you would expect this actually improves the compresion ratio, since 3 literal bytes will often be shorter than a match after huffman encoding. This varies a bit by source, but is most often the case when the source is "easy" to compress. Second of all, a "stronger" hash is used. The hash is similar to the hashing function used by Snappy. Overall, the speed impact is biggest on higher compression levels. I intend to replace the "speed" compression level, which can be seen in CL 21021. The built-in benchmark using "digits" is slower at level 1. I see this as an exception, since "digits" is a special type of data, where you have low entropy (numbers 0->9), but no significant matches. Again, CL 20021 fixes that case. NewWriterDict is also made considerably faster, by not running data through the entire encoder. This is not reflected by the benchmark. Overall, the speed impact is biggest on higher compression levels. I intend to replace the "speed" compression level. COMPARED to tip/master: name old time/op new time/op delta EncodeDigitsSpeed1e4-4 401µs ± 1% 345µs ± 2% -13.95% EncodeDigitsSpeed1e5-4 3.19ms ± 1% 4.27ms ± 3% +33.96% EncodeDigitsSpeed1e6-4 27.7ms ± 4% 43.8ms ± 3% +58.00% EncodeDigitsDefault1e4-4 641µs ± 0% 403µs ± 1% -37.15% EncodeDigitsDefault1e5-4 13.8ms ± 1% 6.4ms ± 3% -53.73% EncodeDigitsDefault1e6-4 162ms ± 1% 64ms ± 2% -60.51% EncodeDigitsCompress1e4-4 627µs ± 1% 405µs ± 2% -35.45% EncodeDigitsCompress1e5-4 13.9ms ± 0% 6.3ms ± 2% -54.46% EncodeDigitsCompress1e6-4 159ms ± 1% 64ms ± 0% -59.91% EncodeTwainSpeed1e4-4 433µs ± 4% 331µs ± 1% -23.53% EncodeTwainSpeed1e5-4 2.82ms ± 1% 3.08ms ± 0% +9.10% EncodeTwainSpeed1e6-4 28.1ms ± 2% 28.8ms ± 0% +2.82% EncodeTwainDefault1e4-4 695µs ± 4% 474µs ± 1% -31.78% EncodeTwainDefault1e5-4 11.8ms ± 0% 7.4ms ± 0% -37.31% EncodeTwainDefault1e6-4 128ms ± 0% 75ms ± 0% -40.93% EncodeTwainCompress1e4-4 719µs ± 3% 480µs ± 0% -33.27% EncodeTwainCompress1e5-4 15.0ms ± 3% 8.2ms ± 2% -45.55% EncodeTwainCompress1e6-4 170ms ± 0% 85ms ± 1% -49.99% name old speed new speed delta EncodeDigitsSpeed1e4-4 25.0MB/s ± 1% 29.0MB/s ± 2% +16.24% EncodeDigitsSpeed1e5-4 31.4MB/s ± 1% 23.4MB/s ± 3% -25.34% EncodeDigitsSpeed1e6-4 36.1MB/s ± 4% 22.8MB/s ± 3% -36.74% EncodeDigitsDefault1e4-4 15.6MB/s ± 0% 24.8MB/s ± 1% +59.11% EncodeDigitsDefault1e5-4 7.27MB/s ± 1% 15.72MB/s ± 3% +116.23% EncodeDigitsDefault1e6-4 6.16MB/s ± 0% 15.60MB/s ± 2% +153.25% EncodeDigitsCompress1e4-4 15.9MB/s ± 1% 24.7MB/s ± 2% +54.97% EncodeDigitsCompress1e5-4 7.19MB/s ± 0% 15.78MB/s ± 2% +119.62% EncodeDigitsCompress1e6-4 6.27MB/s ± 1% 15.65MB/s ± 0% +149.52% EncodeTwainSpeed1e4-4 23.1MB/s ± 4% 30.2MB/s ± 1% +30.68% EncodeTwainSpeed1e5-4 35.4MB/s ± 1% 32.5MB/s ± 0% -8.34% EncodeTwainSpeed1e6-4 35.6MB/s ± 2% 34.7MB/s ± 0% -2.77% EncodeTwainDefault1e4-4 14.4MB/s ± 4% 21.1MB/s ± 1% +46.48% EncodeTwainDefault1e5-4 8.49MB/s ± 0% 13.55MB/s ± 0% +59.50% EncodeTwainDefault1e6-4 7.83MB/s ± 0% 13.25MB/s ± 0% +69.19% EncodeTwainCompress1e4-4 13.9MB/s ± 3% 20.8MB/s ± 0% +49.83% EncodeTwainCompress1e5-4 6.65MB/s ± 3% 12.20MB/s ± 2% +83.51% EncodeTwainCompress1e6-4 5.88MB/s ± 0% 11.76MB/s ± 1% +100.06% Change-Id: I724e33c1dd3e3a6a1b0a68e094baa959352baf32 Reviewed-on: https://go-review.googlesource.com/20929 Run-TryBot: Nigel Tao <nigeltao@golang.org> Reviewed-by: Nigel Tao <nigeltao@golang.org>
-
Dave Cheney authored
Some ssa.Type implementations fell through to gc.Tconv which generated garbage to produce a string form of the Type. name old time/op new time/op delta Template 405ms ± 7% 401ms ± 6% ~ (p=0.478 n=20+20) GoTypes 1.32s ± 1% 1.30s ± 2% -1.27% (p=0.000 n=19+20) Compiler 6.07s ± 2% 6.03s ± 2% ~ (p=0.121 n=20+20) name old alloc/op new alloc/op delta Template 63.9MB ± 0% 63.7MB ± 0% -0.21% (p=0.000 n=19+20) GoTypes 220MB ± 0% 219MB ± 0% -0.21% (p=0.000 n=20+20) Compiler 966MB ± 0% 965MB ± 0% -0.11% (p=0.000 n=20+20) name old allocs/op new allocs/op delta Template 708k ± 0% 701k ± 0% -0.99% (p=0.000 n=20+20) GoTypes 2.20M ± 0% 2.17M ± 0% -1.43% (p=0.000 n=17+20) Compiler 9.45M ± 0% 9.36M ± 0% -0.91% (p=0.000 n=20+20) Change-Id: I5fcc30e0f76a823d1c301d4980b583d716a75ce3 Reviewed-on: https://go-review.googlesource.com/20844Reviewed-by: Keith Randall <khr@golang.org>
-
Dave Cheney authored
The pattern n := Nod(OXXX, nil, nil) Nodconst(n, ...) was a leftover from the C days where n must be heap allocated. No change in benchmarks, none expected as n escapes anyway. name old time/op new time/op delta Template 391ms ± 6% 388ms ± 5% ~ (p=0.659 n=20+20) GoTypes 1.27s ± 1% 1.27s ± 2% ~ (p=0.828 n=18+20) Compiler 6.16s ± 2% 6.15s ± 1% ~ (p=0.947 n=20+20) name old alloc/op new alloc/op delta Template 63.7MB ± 0% 63.7MB ± 0% ~ (p=0.414 n=20+20) GoTypes 219MB ± 0% 219MB ± 0% ~ (p=0.904 n=20+20) Compiler 980MB ± 0% 980MB ± 0% +0.00% (p=0.007 n=20+19) name old allocs/op new allocs/op delta Template 586k ± 0% 586k ± 0% ~ (p=0.564 n=19+20) GoTypes 1.80M ± 0% 1.80M ± 0% ~ (p=0.718 n=20+20) Compiler 7.74M ± 0% 7.74M ± 0% ~ (p=0.358 n=20+20) The reuse of nc in multiple overlapping scopes in walk.go is the worst. Change-Id: I4ed6a63f7ffbfff68124ad609f6e3a68d95cbbba Reviewed-on: https://go-review.googlesource.com/21015Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Aliaksandr Valialkin authored
Fixes #14529 Change-Id: I6ed059d279ba0fe12d76416859659f28d61781d2 Reviewed-on: https://go-review.googlesource.com/20832 Run-TryBot: Rob Pike <r@golang.org> Reviewed-by: Rob Pike <r@golang.org>
-
Martin Möhrmann authored
Make a fast path for format strings that do not use precision or width specifications or argument indices. Only check and enforce the restriction to not pad left with zeros in code paths that change either f.minus or f.zero. Consolidate the if chains at the end of the main doPrintf loop into a switch statement. Move error printing into extra functions to reduce size of this switch statement. name old time/op new time/op delta SprintfPadding-2 234ns ± 1% 233ns ± 1% -0.54% (p=0.010 n=19+19) SprintfEmpty-2 37.0ns ± 3% 39.1ns ±14% ~ (p=0.501 n=17+20) SprintfString-2 112ns ± 1% 101ns ± 1% -9.21% (p=0.000 n=19+20) SprintfTruncateString-2 139ns ± 1% 139ns ± 0% +0.57% (p=0.000 n=19+19) SprintfQuoteString-2 402ns ± 0% 392ns ± 0% -2.35% (p=0.000 n=19+20) SprintfInt-2 114ns ± 1% 102ns ± 2% -10.92% (p=0.000 n=20+20) SprintfIntInt-2 177ns ± 2% 155ns ± 2% -12.67% (p=0.000 n=18+18) SprintfPrefixedInt-2 260ns ± 3% 249ns ± 3% -4.55% (p=0.000 n=20+20) SprintfFloat-2 190ns ± 1% 178ns ± 2% -6.54% (p=0.000 n=20+20) SprintfComplex-2 533ns ± 1% 517ns ± 3% -2.95% (p=0.000 n=20+20) SprintfBoolean-2 102ns ± 1% 93ns ± 2% -9.30% (p=0.000 n=20+20) SprintfHexString-2 176ns ± 0% 168ns ± 2% -4.49% (p=0.000 n=16+19) SprintfHexBytes-2 181ns ± 1% 174ns ± 2% -4.27% (p=0.000 n=20+20) SprintfBytes-2 326ns ± 1% 311ns ± 1% -4.51% (p=0.000 n=20+20) ManyArgs-2 540ns ± 2% 497ns ± 1% -8.08% (p=0.000 n=18+16) FprintInt-2 150ns ± 0% 149ns ± 0% -0.33% (p=0.000 n=20+18) FprintfBytes-2 185ns ± 0% 165ns ± 0% -10.98% (p=0.000 n=20+18) FprintIntNoAlloc-2 113ns ± 0% 112ns ± 0% -0.88% (p=0.000 n=20+20) Change-Id: I9ada8faa1f46aa67ea116a94ab3f4ad3e405c8fe Reviewed-on: https://go-review.googlesource.com/20919 Run-TryBot: Rob Pike <r@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rob Pike <r@golang.org>
-
Tamir Duberstein authored
The exclusion of string from IsScanValue prevents driver authors from writing their drivers in such a way that would allow users to distinguish between strings and byte arrays returned from a database. Such drivers are possible today, but require their authors to deviate from the guidance provided by the standard library. This exclusion has been in place since the birth of this package in https://github.com/golang/go/commit/357f2cb1a385f4d1418e48856f9abe0cce, but the fakedb implementation shipped in the same commit violates the exclusion! Strictly speaking this is a breaking change, but it increases the set of permissible Scan types, and should not cause breakage in practice. No test changes are necessary because fakedb already exercises this. Fixes #6497. Change-Id: I69dbd3a59d90464bcae8c852d7ec6c97bfd120f8 Reviewed-on: https://go-review.googlesource.com/19439 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Ian Lance Taylor authored
This is to support https://golang.org/cl/18057, which is going to add Windows support to this directory. Better to write the test in Go then to have both test.bash and test.bat. Update #13494. Change-Id: I4af7004416309e885049ee60b9470926282f210d Reviewed-on: https://go-review.googlesource.com/20892 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Mikio Hara authored
Updates #14544. Change-Id: I24ab8e6f9ad9d290a672216fc2f50f78c3ed8812 Reviewed-on: https://go-review.googlesource.com/21014 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Keith Randall authored
No need to have both ops when they do the same thing. Just declare MOVBload to zero extend and we can get rid of MOVBQZXload. Same for W and L. Kind of a followon cleanup for https://go-review.googlesource.com/c/19506/ Should enable an easier fix for #14920 Change-Id: I7cfac909a8ba387f433a6ae75c050740ebb34d42 Reviewed-on: https://go-review.googlesource.com/21004 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 22 Mar, 2016 16 commits
-
-
Michael Munday authored
Change-Id: Ib44c6b1ce07aa8fb67033cf21e177a90fd4005dc Reviewed-on: https://go-review.googlesource.com/21002Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Shahar Kohanim authored
Speeds up linking cmd/go by 1.7% name old s/op new s/op delta LinkCmdGo 0.58 ± 4% 0.57 ± 5% -1.74% (p=0.000 n=96+97) Change-Id: I7844cf4e2eeac260318de2b6ddf52ce07a6e00f5 Reviewed-on: https://go-review.googlesource.com/20915 TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Keith Randall authored
They are kind of useless and are cluttering up https://go-review.googlesource.com/c/21000/ Change-Id: Iafdec75ada11c7ebdc40540d251fdc514bb00d3d Reviewed-on: https://go-review.googlesource.com/21001Reviewed-by: Minux Ma <minux@golang.org>
-
Robert Griesemer authored
This makes the rounding bug fix in math/big for issue 14651 available to the compiler. - changes to cmd/compile/internal/big fully automatic via script - added test case for issue - updated old test case with correct test data Fixes #14651. Change-Id: Iea37a2cd8d3a75f8c96193748b66156a987bbe40 Reviewed-on: https://go-review.googlesource.com/20818Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Robert Griesemer authored
Change-Id: Iab0add7aee51a8c72a81f51d980d22d2fd612f5c Reviewed-on: https://go-review.googlesource.com/20817Reviewed-by: Alan Donovan <adonovan@google.com>
-
Alexandru Moșoi authored
Shows up occassionally, especially after p = p[:8:len(p)] Updates #14905 Change-Id: Iab35ef2eac57817e6a10c6aaeeb84709e8021641 Reviewed-on: https://go-review.googlesource.com/21025 Run-TryBot: Alexandru Moșoi <alexandru@mosoi.ro> Reviewed-by: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Marcel van Lohuizen authored
Fixes #12166 Change-Id: Ie62cba2c39beb5732447ba3688c93c08ef12abb5 Reviewed-on: https://go-review.googlesource.com/18898Reviewed-by: Russ Cox <rsc@golang.org> Run-TryBot: Marcel van Lohuizen <mpvl@golang.org>
-
Marcel van Lohuizen authored
The matcher is responsible for sanitizing and uniquing the test and benchmark names and thus needs to be included before the API can be exposed. Matching currently uses the regexp to only match the top-level tests/benchmarks. Support for subtest matching is for another CL. Change-Id: I7c8464068faef7ebc179b03a7fe3d01122cc4f0b Reviewed-on: https://go-review.googlesource.com/18897Reviewed-by: Russ Cox <rsc@golang.org> Run-TryBot: Marcel van Lohuizen <mpvl@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Josh Bleecher Snyder authored
Escape analysis has a hard time with tree-like structures (see #13493 and #14858). This is unlikely to change. As a result, when invoking a function that accepts a **Node parameter, we usually allocate a *Node on the heap. This happens a whole lot. This CL changes functions from taking a **Node to acting more like append: It both modifies the input and returns a replacement for it. Because of the cascading nature of escape analysis, in order to get the benefits, I had to modify almost all such functions. The remaining functions are in racewalk and the backend. I would be happy to update them as well in a separate CL. This CL was created by manually updating the function signatures and the directly impacted bits of code. The callsites were then automatically updated using a bespoke script: https://gist.github.com/josharian/046b1be7aceae244de39 For ease of reviewing and future understanding, this CL is also broken down into four CLs, mailed separately, which show the manual and the automated changes separately. They are CLs 20990, 20991, 20992, and 20993. Passes toolstash -cmp. name old time/op new time/op delta Template 335ms ± 5% 324ms ± 5% -3.35% (p=0.000 n=23+24) Unicode 176ms ± 9% 165ms ± 6% -6.12% (p=0.000 n=23+24) GoTypes 1.10s ± 4% 1.07s ± 2% -2.77% (p=0.000 n=24+24) Compiler 5.31s ± 3% 5.15s ± 3% -2.95% (p=0.000 n=24+24) MakeBash 41.6s ± 1% 41.7s ± 2% ~ (p=0.586 n=23+23) name old alloc/op new alloc/op delta Template 63.3MB ± 0% 62.4MB ± 0% -1.36% (p=0.000 n=25+23) Unicode 42.4MB ± 0% 41.6MB ± 0% -1.99% (p=0.000 n=24+25) GoTypes 220MB ± 0% 217MB ± 0% -1.11% (p=0.000 n=25+25) Compiler 994MB ± 0% 973MB ± 0% -2.08% (p=0.000 n=24+25) name old allocs/op new allocs/op delta Template 681k ± 0% 574k ± 0% -15.71% (p=0.000 n=24+25) Unicode 518k ± 0% 413k ± 0% -20.34% (p=0.000 n=25+24) GoTypes 2.08M ± 0% 1.78M ± 0% -14.62% (p=0.000 n=25+25) Compiler 9.26M ± 0% 7.64M ± 0% -17.48% (p=0.000 n=25+25) name old text-bytes new text-bytes delta HelloSize 578k ± 0% 578k ± 0% ~ (all samples are equal) CmdGoSize 6.46M ± 0% 6.46M ± 0% ~ (all samples are equal) name old data-bytes new data-bytes delta HelloSize 128k ± 0% 128k ± 0% ~ (all samples are equal) CmdGoSize 281k ± 0% 281k ± 0% ~ (all samples are equal) name old exe-bytes new exe-bytes delta HelloSize 921k ± 0% 921k ± 0% ~ (all samples are equal) CmdGoSize 9.86M ± 0% 9.86M ± 0% ~ (all samples are equal) Change-Id: I277d95bd56d51c166ef7f560647aeaa092f3f475 Reviewed-on: https://go-review.googlesource.com/20959Reviewed-by: Dave Cheney <dave@cheney.net> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Ian Lance Taylor authored
These new methods help find the compilation unit to pass to the LineReader method in order to find the line information for a PC. The Ranges method also helps identify the specific function for a PC, needed to determine the function name. This uses the .debug.ranges section if necessary, and changes the object file format packages to pass in the section contents if available. Change-Id: I5ebc3d27faaf1a126ffb17a1e6027efdf64af836 Reviewed-on: https://go-review.googlesource.com/20769Reviewed-by: Austin Clements <austin@google.com> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Dominik Honnef authored
Change-Id: I64dd09e76d811000a914776fdad47808e3895690 Reviewed-on: https://go-review.googlesource.com/20989Reviewed-by: Dave Cheney <dave@cheney.net>
-
Michael Munday authored
Required to pass the issue9400 test. Change-Id: I595223c403b12faade54e2e46510f8537150af39 Reviewed-on: https://go-review.googlesource.com/20940Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Michael Munday authored
Change-Id: I81376f524e76db25fd52cc5bec2c80fbf618a0c5 Reviewed-on: https://go-review.googlesource.com/20877Reviewed-by: Minux Ma <minux@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Michael Munday authored
Adds a new R_PCRELDBL relocation for 2-byte aligned relative relocations on s390x. Should be removed once #14218 is implemented. Change-Id: I79dd2d8e746ba8cbc26c570faccfdd691e8161e8 Reviewed-on: https://go-review.googlesource.com/20941Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Keith Randall authored
There is a special case for slicing s[i:j] when the resulting slice has zero capacity, to prevent pointing to the next object in memory. Change this special case code from: rptr := rcap == 0 ? ptr : ptr+i*elemsize to rptr := ptr + (rcap == 0 ? 0 : i) * elemsize This change leads to slightly smaller generated code, replacing a load with a register zero. old: 0x002e 00046 (slice.go:8) CMPQ BX, $0 0x0032 00050 (slice.go:8) JEQ $0, 78 0x0034 00052 (slice.go:8) MOVQ "".a+8(FP), BP 0x0039 00057 (slice.go:8) LEAQ (BP)(CX*8), AX 0x003e 00062 ... rest of function ... 0x004e 00078 (slice.go:7) MOVQ "".a+8(FP), AX 0x0053 00083 (slice.go:8) JMP 62 new: 0x002e 00046 (slice.go:8) CMPQ BX, $0 0x0032 00050 (slice.go:8) JEQ $0, 78 0x0034 00052 (slice.go:8) MOVQ "".a+8(FP), BP 0x0039 00057 (slice.go:8) LEAQ (BP)(CX*8), AX 0x003e 00062 ... rest of function... 0x004e 00078 (slice.go:8) MOVQ $0, CX 0x0050 00080 (slice.go:8) JMP 52 Change-Id: I2a396616b0d7b090c226a47c92a7ba14b128401f Reviewed-on: https://go-review.googlesource.com/20994Reviewed-by: David Chase <drchase@google.com>
-
David Crawshaw authored
Fixes #14901 Change-Id: Ia32e09767374a341c9a36c5d977d47d7d1a82315 Reviewed-on: https://go-review.googlesource.com/20967Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org>
-