| Age | Commit message (Collapse) | Author |
|
Preparation was in CL 134570043.
This CL contains only the effect of 'hg mv src/pkg/* src'.
For more about the move, see golang.org/s/go14nopkg.
|
|
Fixes #8143.
LGTM=r
R=rsc, bradfitz, r
CC=golang-codereviews
https://golang.org/cl/135760043
|
|
Call copy with as large buffer as possible to reduce the
number of function calls.
benchmark old ns/op new ns/op delta
BenchmarkBytesRepeat 540 162 -70.00%
BenchmarkStringsRepeat 563 177 -68.56%
LGTM=josharian
R=golang-codereviews, josharian, dave, dvyukov
CC=golang-codereviews
https://golang.org/cl/90550043
|
|
utf8.RuneLen returns -1 for an invalid rune. In that case we
need to extend the internal buffer at least by 3 for \uFFFD.
Fixes #7577.
LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/77420044
|
|
Similar to CL 3814041 that fixed the same issue in strings.
Fixes #6941.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/41490045
|
|
R=golang-dev, dave, bradfitz, adg
CC=golang-dev
https://golang.org/cl/13249043
|
|
Phrases like "returns whether or not the image is opaque" could be
describing what the function does (it always returns, regardless of
the opacity) or what it returns (a boolean indicating the opacity).
Even when the "or not" is missing, the phrasing is bizarre.
Go with "reports whether", which is still clunky but at least makes
it clear we're talking about the return value.
These were edited by hand. A few were cleaned up in other ways.
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/11699043
|
|
Uses SSE instructions to process 16 bytes at a time.
fixes #5354
R=bradfitz, google
CC=golang-dev
https://golang.org/cl/8853048
|
|
R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/7856048
|
|
Avoids printing it every time we ask a question about the package from
the command line.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7789048
|
|
R=golang-dev, agl, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/7299064
|
|
Before and after:
BenchmarkTrimSpace 20000000 81.3 ns/op
BenchmarkTrimSpace 50000000 58.0 ns/op
(most whitespace trimming is ASCII whitespace)
Same optimization appeared a handful of other places
in this file, but not here.
R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/7305063
|
|
Everybody either gets confused and thinks this is
TrimLeft/TrimRight or does this by hand which gets
repetitive looking.
R=rsc, kevlar
CC=golang-dev
https://golang.org/cl/7239044
|
|
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/7067047
|
|
R=rsc, mdempsky, dave
CC=golang-dev
https://golang.org/cl/7028051
|
|
Fixes #3844.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6432054
|
|
R=r
CC=golang-dev
https://golang.org/cl/6301096
|
|
R=golang-dev, bradfitz, r, r
CC=golang-dev
https://golang.org/cl/5676090
|
|
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5448091
|
|
Benchmarks are from GOARCH=amd64 on a MacPro5,1.
benchmark old MB/s new MB/s speedup
bytes_test.BenchmarkEqual32 452.89 891.07 1.97x
bytes_test.BenchmarkEqual4K 852.71 1700.44 1.99x
bytes_test.BenchmarkEqual4M 841.53 1587.93 1.89x
bytes_test.BenchmarkEqual64M 838.22 1578.14 1.88x
bytes_test.BenchmarkIndex32 58.02 48.99 0.84x
bytes_test.BenchmarkIndex4K 48.26 41.32 0.86x
bytes_test.BenchmarkIndex4M 48.20 41.24 0.86x
bytes_test.BenchmarkIndex64M 48.08 41.21 0.86x
bytes_test.BenchmarkIndexEasy32 410.04 546.82 1.33x
bytes_test.BenchmarkIndexEasy4K 849.26 14257.37 16.79x
bytes_test.BenchmarkIndexEasy4M 854.54 17222.15 20.15x
bytes_test.BenchmarkIndexEasy64M 843.57 11060.40 13.11x
bytes_test.BenchmarkCount32 57.24 50.68 0.89x
bytes_test.BenchmarkCount4K 48.19 41.82 0.87x
bytes_test.BenchmarkCount4M 48.18 41.74 0.87x
bytes_test.BenchmarkCount64M 48.17 41.71 0.87x
bytes_test.BenchmarkCountEasy32 433.11 547.44 1.26x
bytes_test.BenchmarkCountEasy4K 1130.59 14194.06 12.55x
bytes_test.BenchmarkCountEasy4M 1131.23 17231.18 15.23x
bytes_test.BenchmarkCountEasy64M 1111.40 11068.88 9.96x
The non-easy Count/Index benchmarks are a worst case input.
regexp.BenchmarkMatchEasy0_32 237.46 221.47 0.93x
regexp.BenchmarkMatchEasy0_1K 553.53 1019.72 1.84x
regexp.BenchmarkMatchEasy0_32K 693.99 1672.06 2.41x
regexp.BenchmarkMatchEasy0_1M 688.72 1611.68 2.34x
regexp.BenchmarkMatchEasy0_32M 680.70 1565.05 2.30x
regexp.BenchmarkMatchEasy1_32 165.56 243.08 1.47x
regexp.BenchmarkMatchEasy1_1K 336.45 496.32 1.48x
regexp.BenchmarkMatchEasy1_32K 302.80 425.63 1.41x
regexp.BenchmarkMatchEasy1_1M 300.42 414.20 1.38x
regexp.BenchmarkMatchEasy1_32M 299.64 413.47 1.38x
R=golang-dev, r, iant
CC=golang-dev
https://golang.org/cl/5451116
|
|
R=rsc
CC=golang-dev
https://golang.org/cl/5358041
|
|
R=bradfitz
CC=golang-dev
https://golang.org/cl/5340044
|
|
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5349041
|
|
Various rune-based APIs change.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5306044
|
|
R=golang-dev, r, r
CC=golang-dev
https://golang.org/cl/5123047
|
|
The documentation for bytes.Replace says it copies
the slice but it won't necessarily copy them. Since
the data is mutable, breaking the contract is an issue.
We either have to fix this by making the copy at all
times, as suggested in this CL, or we should change the
documentation and perhaps make better use of the fact
it's fine to mutate the slice in place otherwise.
R=golang-dev, bradfitz, adg, rsc
CC=golang-dev
https://golang.org/cl/5081043
|
|
manual changes in src/pkg/go/printer, src/cmd/gofix/signal_test.go
(cd src/cmd/gofix/testdata; gofmt -w *.in *.out)
(cd src/pkg/go/printer; gotest -update)
gofmt -w misc src
runs all tests
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4715041
|
|
Change the signature of Split to have no count,
assuming a full split, and rename the existing
Split with a count to SplitN.
Do the same to package bytes.
Add a gofix module.
R=adg, dsymonds, alex.brainman, rsc
CC=golang-dev
https://golang.org/cl/4661051
|
|
R=rsc
CC=golang-dev
https://golang.org/cl/4442064
|
|
R=gri, rsc
CC=golang-dev
https://golang.org/cl/4300044
|
|
Fixes #1401.
R=golang-dev, agl1
CC=golang-dev
https://golang.org/cl/3937041
|
|
Changed all uses of bytes.Add (aside from those testing bytes.Add) to append(a, b...).
Also ran "gofmt -s" and made use of copy([]byte, string) in the fasta benchmark.
R=golang-dev, r, r2
CC=golang-dev
https://golang.org/cl/3302042
|
|
R=r
CC=golang-dev
https://golang.org/cl/3364041
|
|
The need for a LastIndexAny function has come up in the discussion
for https://golang.org/cl/3008041/. This function is
implemented analogously to lastIndexFunc, using functions from
the utf8 package.
R=r, rsc, PeterGo
CC=golang-dev
https://golang.org/cl/3057041
|
|
R=gri, r, r2
CC=golang-dev
https://golang.org/cl/2743042
|
|
R=gri
CC=golang-dev
https://golang.org/cl/2763041
|
|
Fixes #1140.
R=golang-dev
CC=golang-dev
https://golang.org/cl/2240043
|
|
R=r
CC=golang-dev, rsc
https://golang.org/cl/2271041
|
|
Basically these functions are implemented the same way as the
corresponding functions in the strings package. Test functions
are implemented for IndexRune and FieldsFunc.
Additionally two typos are fixed in packages bytes and strings.
R=r
CC=golang-dev
https://golang.org/cl/1696062
|
|
R=r, rsc
CC=golang-dev
https://golang.org/cl/1669055
|
|
This CL basically applies the same changes as
http://code.google.com/p/go/source/detail?r=5e0a29014e8e
but for bytes package.
R=r, rog
CC=golang-dev
https://golang.org/cl/1670052
|
|
R=adg, rsc
CC=golang-dev
https://golang.org/cl/1886042
|
|
R=rsc
CC=golang-dev
https://golang.org/cl/1872042
|
|
Use a count of -1 for infinity. Ditto for Replace.
R=rsc
CC=golang-dev
https://golang.org/cl/1704044
|
|
This is the Replace I suggested in the review of CL 1114041.
It's true that we already have
regexp.MustCompile(regexp.QuoteMeta(old)).ReplaceAll(s, new)
but because this Replace is doing a simpler job it is
simpler to call and inherently more efficient.
I will add the bytes implementation and tests to the
CL after the strings one has been reviewed.
R=r, cw
CC=golang-dev
https://golang.org/cl/1731048
|
|
to make it easier to build package without assembly.
R=r, r2
CC=golang-dev
https://golang.org/cl/1680045
|
|
R=rsc, r
CC=golang-dev
https://golang.org/cl/946045
|
|
Also improve the implementations of Equals and Compare.
R=rsc
CC=golang-dev
https://golang.org/cl/969047
|
|
+ first use in go/doc
R=r
CC=golang-dev
https://golang.org/cl/781041
|
|
R=rsc, r, phf
CC=golang-dev
https://golang.org/cl/170046
|