- 22 Aug, 2015 2 commits
-
-
Ingo Oeser authored
Add benchmarks for for sparsely escaped and densely escaped strings. Then speed up the sparse unescaping part heavily by using IndexByte and copy to skip the parts containing no escaping very fast. Unescaping densely escaped strings slower because of the new function call overhead. But sparsely encoded strings are seen more often in the utf8 enabled web. We win part of the speed back by looking up entityName differently. benchmark old ns/op new ns/op delta BenchmarkEscape 31680 31396 -0.90% BenchmarkEscapeNone 6507 6872 +5.61% BenchmarkUnescape 36481 48298 +32.39% BenchmarkUnescapeNone 332 325 -2.11% BenchmarkUnescapeSparse 8836 3221 -63.55% BenchmarkUnescapeDense 30639 32224 +5.17% Change-Id: If606cb01897a40eefe35ba98f2ff23bb25251606 Reviewed-on: https://go-review.googlesource.com/10172Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Justin Nuß authored
The current implementations of MarshalJSON and MarshalText use time.Format which returns a string (converted from a byte slice), only to convert it back to a byte slice. Avoid the conversion (and thus an allocation) by directly appending the formatted time to a preallocated byte slice, using the new AppendFormat function, introduced in golang.org/cl/1760. This reduces the allocations done in Marshal[Text|JSON] by 50%. benchmark old ns/op new ns/op delta BenchmarkMarshalJSON 626 507 -19.01% BenchmarkMarshalText 598 511 -14.55% benchmark old allocs new allocs delta BenchmarkMarshalJSON 2 1 -50.00% BenchmarkMarshalText 2 1 -50.00% benchmark old bytes new bytes delta BenchmarkMarshalJSON 96 48 -50.00% BenchmarkMarshalText 96 48 -50.00% Fixes #11025 Change-Id: I468f78d075a6ecc1cdc839df7fb407fbc6ff2e70 Reviewed-on: https://go-review.googlesource.com/10555Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 21 Aug, 2015 16 commits
-
-
Brad Fitzpatrick authored
Safer, more readable, shorter. Change-Id: I5cf1f438e20a3df45fc43cc5c870a533f7c524bf Reviewed-on: https://go-review.googlesource.com/10517Reviewed-by: Minux Ma <minux@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Alberto Donizetti authored
Currently an expression like var v = 0 >> 1000 is rejected by gc with a "stupid shift" error, while gotype compiles it successfully. As suggested by gri on the issue tracker, allow an rsh right operand to be any valid uint value. Fixes #11328 Change-Id: I6ccb3b7f842338d91fd26ae37dd4fa279d7fc440 Reviewed-on: https://go-review.googlesource.com/13777Reviewed-by: Robert Griesemer <gri@golang.org>
-
Robert Griesemer authored
This updates the big package used by the compiler to match the public big package which contains some updates and bug fixes. Obtained by running vendor.bash in the internal/big directory. No manual changes. Change-Id: I299aecc6599d4a745a721ce48def32449640dbb2 Reviewed-on: https://go-review.googlesource.com/13815Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Robert Griesemer authored
Fixes #12231. Change-Id: I1f07c444623cd864667e21b2fee534eacdc193bb Reviewed-on: https://go-review.googlesource.com/13814Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
David du Colombier authored
When there is no browser available on the system, we should print the URL instead of failing. Change-Id: I4a2b099e17609394273eff150062c285d76bbac1 Reviewed-on: https://go-review.googlesource.com/13774Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
-
Alberto Donizetti authored
Even though the umul/uquo functions expect two valid, finite big.Floats arguments, SetString was calling them with possibly Inf values, which resulted in bogus return values. Replace umul and udiv calls with Mul and Quo calls to fix this. Also, fix two wrong tests. See relevant issue on issue tracker for a detailed explanation. Fixes #11341 Change-Id: Ie35222763a57a2d712a5f5f7baec75cab8189a53 Reviewed-on: https://go-review.googlesource.com/13778Reviewed-by: Robert Griesemer <gri@golang.org>
-
Robert Griesemer authored
This is not a functional change. Also: - minor cleanups, better comments - uniform spelling of noun "zeros" (per OED) Fixes #11277. Change-Id: I1726f358ce15907bd2410f646b02cf8b11b919cd Reviewed-on: https://go-review.googlesource.com/11267Reviewed-by: Alan Donovan <adonovan@google.com> Reviewed-by: Robert Griesemer <gri@golang.org>
-
Hyang-Ah (Hana) Kim authored
I cannot find where it's being used. This addresses a duplicate symbol issue encountered in golang/go#9327. Change-Id: I8efda45a006ad3e19423748210c78bd5831215e0 Reviewed-on: https://go-review.googlesource.com/13615Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Shawn Walker-Salas authored
CL 9184 changed the runtime and syscall packages to link Solaris binaries directly instead of using dlopen/dlsym but did not remove the unused (and now broken) references to dlopen, dlclose, and dlsym. Fixes #11923 Change-Id: I36345ce5e7b371bd601b7d48af000f4ccacd62c0 Reviewed-on: https://go-review.googlesource.com/13410Reviewed-by: Aram Hăvărneanu <aram@mgk.ro>
-
Rob Pike authored
Change-Id: I5310cef72e714b22bcf2ae9e6fd85dbb7e8a15a2 Reviewed-on: https://go-review.googlesource.com/13787Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Rob Pike authored
Could go in 1.5, although not critical. See also #12107 Change-Id: I7f1608b58581d21df4db58f0db654fef79e33a90 Reviewed-on: https://go-review.googlesource.com/13481Reviewed-by: Dave Cheney <dave@cheney.net>
-
Robert Griesemer authored
R=1.6 Fixes #11669. Change-Id: Id39e5401e991e46f014eb16b747f5d9b7b55b46a Reviewed-on: https://go-review.googlesource.com/12937Reviewed-by: Alan Donovan <adonovan@google.com>
-
Robert Griesemer authored
R=1.6 Fixes #11347. Change-Id: Ic6b09f38682500ffcc8d1f96e58f7237a7528806 Reviewed-on: https://go-review.googlesource.com/12812Reviewed-by: Alan Donovan <adonovan@google.com>
-
Robert Griesemer authored
R=1.6 Fixes #11667. Fixes #11687. Change-Id: I060db212e8e0ee35fdefb4d482398f8f71650b38 Reviewed-on: https://go-review.googlesource.com/12713Reviewed-by: Alan Donovan <adonovan@google.com>
-
Dominik Honnef authored
Even Linux systems may not have _SC_GETPW_R_SIZE_MAX if using a different libc than glibc (e.g. musl). Instead of having special-cases for the BSDs, handle -1 correctly by always using a default buffer size. Fixes #11319. Change-Id: I8b1b260eb9830e6dbe7667f3f33d115ae4de4ce8 Reviewed-on: https://go-review.googlesource.com/13772Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
-
Brad Fitzpatrick authored
Fixes #12244 Change-Id: Iee4e45d9bca0718c71fcc574bc51b2084c3dcb2a Reviewed-on: https://go-review.googlesource.com/13783Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
-
- 20 Aug, 2015 2 commits
-
-
Andrew Gerrand authored
Fixes #12229 Change-Id: I243e39f67748e6754fb7726b21b3afc1ff436771 Reviewed-on: https://go-review.googlesource.com/13780Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
David Glasser authored
Change-Id: I1650124dd459dc401ccd73943ff7287b1b8c57e4 Reviewed-on: https://go-review.googlesource.com/13689Reviewed-by: Andrew Gerrand <adg@golang.org>
-
- 19 Aug, 2015 7 commits
-
-
Russ Cox authored
This makes sure the release page in the release will mention the release. Fixes #12102. Change-Id: I36befd7dba7ba9e70ae3335e21c8841179ac4eff Reviewed-on: https://go-review.googlesource.com/13490Reviewed-by: Rob Pike <r@golang.org>
-
Russ Cox authored
This is especially important for LookupAddr, which used to be pure Go (lightweight, one goroutine per call) and without this CL is now unconditionally cgo (heavy, one thread per call). Fixes #12190. Change-Id: I43436a942bc1838b024225893e156f280a1e80cf Reviewed-on: https://go-review.googlesource.com/13698Reviewed-by: Rob Pike <r@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Russ Cox authored
Go 1.4 and before have always returned DNS names with a trailing dot for reverse lookups, as they do for basically all other routines returning DNS names. Go 1.4 and before always implemented LookupAddr using pure Go (not C library calls). Go 1.5 added the ability to make a C library call to implement LookupAddr. Unfortunately the C library call returns a DNS name without a trailing dot (an unrooted name), meaning that if turn off cgo during make.bash then you still get the rooted name but with cgo on you get an unrooted name. The unrooted name is inconsistent with the pure Go implementation and with all previous Go releases, so change it to a rooted name. Fixes #12189. Change-Id: I3d6b72277c121fe085ea6af30e5fe8019fc490ad Reviewed-on: https://go-review.googlesource.com/13697Reviewed-by: Rob Pike <r@golang.org>
-
Russ Cox authored
Fixes #12191. Change-Id: I5c7659ccb0566dad3613041d9e76be87ceacae61 Reviewed-on: https://go-review.googlesource.com/13700Reviewed-by: Rob Pike <r@golang.org>
-
Rob Pike authored
Thanks to Nathan Youngman for spotting them. Change-Id: I1856527af66a5d1965265ec3dcd639d3f6d74bcc Reviewed-on: https://go-review.googlesource.com/13711Reviewed-by: Russ Cox <rsc@golang.org>
-
Russ Cox authored
Saying "Power 64" was wrong for reasons I don't remember. (Those reasons are why we stopped using GOARCH=power64.) Change-Id: Ifaac78d5733bfc780df01b1a66da766af0b17726 Reviewed-on: https://go-review.googlesource.com/13675Reviewed-by: Rob Pike <r@golang.org>
-
Russ Cox authored
Make clear that this list is the list of supported systems for binary distributions, and that other systems may be able to build the distribution from source, in addition to using gccgo. Drop freebsd/arm from the list on this page. We have never issued a binary distribution for freebsd/arm, and we're not going to start in Go 1.5, since we don't even have a working builder for it. Drop freebsd/386 from the list on the page, because we are unable to build binary distributions, per adg. I think the wording here should probably be revised further, but not now. Change-Id: Ib43b6b64f5c438bfb9aa4d3daa43393f1e33b71f Reviewed-on: https://go-review.googlesource.com/13690Reviewed-by: Andrew Gerrand <adg@golang.org> Reviewed-by: Rob Pike <r@golang.org>
-
- 18 Aug, 2015 8 commits
-
-
Russ Cox authored
This was missed when we did the rename months ago because cmd/vet did not live in the main tree. Now vet's asmdecl checks will apply to ppc64 assembly too. Change-Id: I687cba89fef702f29dd118de76a7ca1041c414f6 Reviewed-on: https://go-review.googlesource.com/13677Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Russ Cox authored
Change-Id: Iaeba7c55bbb9e11ac30f3b61369aa597acc30190 Reviewed-on: https://go-review.googlesource.com/13691Reviewed-by: Russ Cox <rsc@golang.org>
-
Russ Cox authored
Update #11184 (linux/ppc64). Filed #12178 (solaris) for Go 1.6. Change-Id: I9e3a456aaccb49590ad4e14b53ddfefca5b0801c Reviewed-on: https://go-review.googlesource.com/13679Reviewed-by: Russ Cox <rsc@golang.org>
-
Russ Cox authored
Tested by hand. Only lines of code changing are protected by Fieldtrack_enabled > 0, which is never true in standard Go distributions. Fixes #12171. Change-Id: I963b9997dac10829db8ad4bfc97a7d6bf14b55c6 Reviewed-on: https://go-review.googlesource.com/13676Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
Fixes #12156. Change-Id: I2d71163b98bcc770147eb9e78dc551a9d0b5b817 Reviewed-on: https://go-review.googlesource.com/13674Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
The text segment starts farther into the binary when using external linking on the mac. Test and fix. Fixes #12173. Change-Id: I1f0c81814bf70cd9decfceac3022784f4608eeef Reviewed-on: https://go-review.googlesource.com/13672Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Rob Pike <r@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Russ Cox authored
Fixes #12154. Change-Id: I1e6d1a3479a8a6fc8f53aebd18fb142506110809 Reviewed-on: https://go-review.googlesource.com/13673Reviewed-by: Rob Pike <r@golang.org>
-
Brad Fitzpatrick authored
Found in a Google program running under the race detector. No test, but verified that this fixes the race with go run -race of: package main import ( "crypto/tls" "fmt" "net" "net/http" "net/http/httptest" ) func main() { for { ts := httptest.NewTLSServer(http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {})) conf := &tls.Config{} // non-nil a, b := net.Pipe() go func() { sconn := tls.Server(a, conf) sconn.Handshake() }() tr := &http.Transport{ TLSClientConfig: conf, } req, _ := http.NewRequest("GET", ts.URL, nil) _, err := tr.RoundTrip(req) println(fmt.Sprint(err)) a.Close() b.Close() ts.Close() } } Also modified cmd/vet to report the copy-of-mutex bug statically in CL 13646, and fixed two other instances in the code found by vet. But vet could not have told us about cloneTLSConfig vs cloneTLSClientConfig. Confirmed that original report is also fixed by this. Fixes #12099. Change-Id: Iba0171549e01852a5ec3438c25a1951c98524dec Reviewed-on: https://go-review.googlesource.com/13453Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Austin Clements <austin@google.com> Run-TryBot: Russ Cox <rsc@golang.org>
-
- 17 Aug, 2015 2 commits
-
-
Ian Lance Taylor authored
The SetOutput function has been there since Go 1. Fixes #12162. Change-Id: I66210374877581e42689f9943532141659a55ca7 Reviewed-on: https://go-review.googlesource.com/13637Reviewed-by: Rob Pike <r@golang.org>
-
Matt Bostock authored
Correct 'an' to 'on' in the comment above the Stable() function. Change-Id: I714e38b2d3a79dfd539d5368967d1c6b519cb948 Reviewed-on: https://go-review.googlesource.com/13662Reviewed-by: Rob Pike <r@golang.org>
-
- 16 Aug, 2015 1 commit
-
-
Dave Cheney authored
Fixes golang/go#12133 CL 13630 fixed the use of a stale reg[] array in the various arch backends which was causing the check in clearfat to pass unconditionally on arm64. With this check fixed, arm64 now considers REGRT1 to always be in use as it is part of the reserved register set, see arm64/gsubr.go. However, ppc64 does not consider REGRT1 and REGRT2 to be part of its reserved set, so its identical clearfat check passes. This CL removes the Reginuse check inside clearfat as REGRT1 is guarenteed always be free on arm64. Change-Id: I4719150d3c3378fae155b863c474529df18d4c17 Reviewed-on: https://go-review.googlesource.com/13650Reviewed-by: Russ Cox <rsc@golang.org>
-
- 15 Aug, 2015 2 commits
-
-
Dmitry Vyukov authored
Use runtime.GOROOT instead of os.Getenv("GOROOT") to reference trace-viewer html file. GOROOT env var is not necessary set, runtime.GOROOT has a default value for such case. Change-Id: I906a720f6822915bd9575756e6cbf6d622857c2b Reviewed-on: https://go-review.googlesource.com/13593Reviewed-by: Russ Cox <rsc@golang.org>
-
Rahul Chaudhry authored
Fixes #12144. Change-Id: I112c6517371215c9797db8f1dffca0f3047c39e3 Reviewed-on: https://go-review.googlesource.com/13633Reviewed-by: Russ Cox <rsc@golang.org>
-