<feed xmlns='http://www.w3.org/2005/Atom'>
<title>go/src/strings/replace.go, branch fix-runtime-test-GOMAXPROCS</title>
<subtitle>Fork of Go programming language with my patches.</subtitle>
<id>http://git.kilabit.info/go/atom?h=fix-runtime-test-GOMAXPROCS</id>
<link rel='self' href='http://git.kilabit.info/go/atom?h=fix-runtime-test-GOMAXPROCS'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/'/>
<updated>2024-07-11T15:01:18Z</updated>
<entry>
<title>strings: more cross-references in docstrings</title>
<updated>2024-07-11T15:01:18Z</updated>
<author>
<name>Kir Kolyshkin</name>
<email>kolyshkin@gmail.com</email>
</author>
<published>2024-07-11T01:37:00Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=611f18c4e9c63921f6e036a4738542f476b7305a'/>
<id>urn:sha1:611f18c4e9c63921f6e036a4738542f476b7305a</id>
<content type='text'>
This amends CL 534775.

Change-Id: I25a217da51853ec29106998e19e9386d756902fc
Reviewed-on: https://go-review.googlesource.com/c/go/+/597655
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Carlos Amedee &lt;carlos@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
Auto-Submit: Ian Lance Taylor &lt;iant@google.com&gt;
</content>
</entry>
<entry>
<title>bytes,strings: add available godoc link</title>
<updated>2023-10-13T17:10:31Z</updated>
<author>
<name>cui fliter</name>
<email>imcusg@gmail.com</email>
</author>
<published>2023-10-12T03:49:26Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=6dd7462a04e2ce0a3e91cdb8fd85e98ac62ba0aa'/>
<id>urn:sha1:6dd7462a04e2ce0a3e91cdb8fd85e98ac62ba0aa</id>
<content type='text'>
Change-Id: Id9706a783d3321e3706eeee102286522e7968efd
Reviewed-on: https://go-review.googlesource.com/c/go/+/534775
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Dmitri Shuralyov &lt;dmitshur@google.com&gt;
Auto-Submit: Ian Lance Taylor &lt;iant@google.com&gt;
</content>
</entry>
<entry>
<title>strings: reduce allocation for byteReplacer</title>
<updated>2022-08-19T16:32:49Z</updated>
<author>
<name>Cuong Manh Le</name>
<email>cuong.manhle.vn@gmail.com</email>
</author>
<published>2022-08-16T03:59:05Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=108021c195c6f43b07c437242bf39614e06b3df4'/>
<id>urn:sha1:108021c195c6f43b07c437242bf39614e06b3df4</id>
<content type='text'>
Though it increases the execution time, the function is already quite
fast for most users, the allocation is much more important.

name                       old time/op    new time/op    delta
ByteReplacerWriteString-8    1.23µs ± 0%    2.16µs ± 1%   +75.31%  (p=0.000 n=10+10)

name                       old alloc/op   new alloc/op   delta
ByteReplacerWriteString-8    2.69kB ± 0%    0.00kB       -100.00%  (p=0.000 n=10+10)

name                       old allocs/op  new allocs/op  delta
ByteReplacerWriteString-8      1.00 ± 0%      0.00       -100.00%  (p=0.000 n=10+10)

Change-Id: I6a36df5fcb8e11ef27e6c7b252aa88e869592f3c
Reviewed-on: https://go-review.googlesource.com/c/go/+/424136
Run-TryBot: Cuong Manh Le &lt;cuong.manhle.vn@gmail.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Joedian Reid &lt;joedian@golang.org&gt;
</content>
</entry>
<entry>
<title>all: gofmt main repo</title>
<updated>2022-04-11T16:34:30Z</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2022-02-03T19:12:08Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=19309779ac5e2f5a2fd3cbb34421dafb2855ac21'/>
<id>urn:sha1:19309779ac5e2f5a2fd3cbb34421dafb2855ac21</id>
<content type='text'>
[This CL is part of a sequence implementing the proposal #51082.
The design doc is at https://go.dev/s/godocfmt-design.]

Run the updated gofmt, which reformats doc comments,
on the main repository. Vendored files are excluded.

For #51082.

Change-Id: I7332f099b60f716295fb34719c98c04eb1a85407
Reviewed-on: https://go-review.googlesource.com/c/go/+/384268
Reviewed-by: Jonathan Amsterdam &lt;jba@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
</content>
</entry>
<entry>
<title>strings: smarter growth of temporal buffer and avoid copying on return</title>
<updated>2021-08-22T23:49:55Z</updated>
<author>
<name>Ignacio Hagopian</name>
<email>jsign.uy@gmail.com</email>
</author>
<published>2021-08-17T23:52:00Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=86ee89225aea2326fd50dbeb233cfc622413a4cf'/>
<id>urn:sha1:86ee89225aea2326fd50dbeb233cfc622413a4cf</id>
<content type='text'>
The implementation for single strings had two optimization opportunities:
1. Grow the temporary buffer by known size before appending.
2. Avoid a full copy of the result since the underlying buffer won't be mutated afterward.
Both things were leveraged by using a Builder instead of a byte slice.

Relevant benchmark results:

        name           old time/op    new time/op    delta
        SingleMatch-8    32.0µs ± 3%    26.1µs ± 3%  -18.41%  (p=0.000 n=9+10)

        name           old speed      new speed      delta
        SingleMatch-8   469MB/s ± 3%   574MB/s ± 3%  +22.56%  (p=0.000 n=9+10)

        name           old alloc/op   new alloc/op   delta
        SingleMatch-8    81.3kB ± 0%    49.0kB ± 0%  -39.67%  (p=0.000 n=10+10)

        name           old allocs/op  new allocs/op  delta
        SingleMatch-8      19.0 ± 0%      11.0 ± 0%  -42.11%  (p=0.000 n=10+10)

Change-Id: I23af56a15875206c0ff4ce29a51bec95fd48bb11
GitHub-Last-Rev: 403cfc3c2794b5da27792c51999417a2a052b365
GitHub-Pull-Request: golang/go#47766
Reviewed-on: https://go-review.googlesource.com/c/go/+/343089
Run-TryBot: Ian Lance Taylor &lt;iant@golang.org&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
Trust: Robert Griesemer &lt;gri@golang.org&gt;
</content>
</entry>
<entry>
<title>strings: document that order of pairs matters in NewReplacer</title>
<updated>2019-07-10T21:26:21Z</updated>
<author>
<name>Francesco Renzi</name>
<email>rentziass@gmail.com</email>
</author>
<published>2019-07-09T13:43:10Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=80cca23b59fe75ba588f7ddee7adb48a6afe2eb7'/>
<id>urn:sha1:80cca23b59fe75ba588f7ddee7adb48a6afe2eb7</id>
<content type='text'>
Update NewReplacer documentation to specify that in the case of
multiple matches at the same position, the matching old/new
pair that appears first in NewReplacer arguments takes precedence.

Fixes #32699

Change-Id: I9d0616d28e5cd8c9bfa301be201f2b0ebf361dff
Reviewed-on: https://go-review.googlesource.com/c/go/+/185099
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
Reviewed-by: Rob Pike &lt;r@golang.org&gt;
</content>
</entry>
<entry>
<title>strings: document that NewReplacer can panic</title>
<updated>2019-04-03T20:15:58Z</updated>
<author>
<name>Brad Fitzpatrick</name>
<email>bradfitz@golang.org</email>
</author>
<published>2019-04-03T19:38:11Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=61e0cac2988c29130417a323fd539604983854fb'/>
<id>urn:sha1:61e0cac2988c29130417a323fd539604983854fb</id>
<content type='text'>
Fixes #31233

Change-Id: I2831d5e6532d3f4ed7eb99af5d6e0e1a41ebac9a
Reviewed-on: https://go-review.googlesource.com/c/go/+/170624
Reviewed-by: Andrew Bonventre &lt;andybons@golang.org&gt;
</content>
</entry>
<entry>
<title>strings: Replace s[:] to s where s is a slice.</title>
<updated>2018-10-13T11:17:13Z</updated>
<author>
<name>Ivan Sharavuev</name>
<email>shpiwan@gmail.com</email>
</author>
<published>2018-10-13T10:14:39Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=c4f07510a0161c4493a751984e24532a1b189759'/>
<id>urn:sha1:c4f07510a0161c4493a751984e24532a1b189759</id>
<content type='text'>
Change-Id: Ie7ba3f9ece9b0fc0e8a5c92fbae9c3b558815e4c
Reviewed-on: https://go-review.googlesource.com/c/141997
Run-TryBot: Iskander Sharipov &lt;iskander.sharipov@intel.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Iskander Sharipov &lt;iskander.sharipov@intel.com&gt;
</content>
</entry>
<entry>
<title>io: export StringWriter</title>
<updated>2018-10-03T20:13:35Z</updated>
<author>
<name>Daniel Martí</name>
<email>mvdan@mvdan.cc</email>
</author>
<published>2018-10-03T20:01:14Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=112f28defcbd8f48de83f4502093ac97149b4da6'/>
<id>urn:sha1:112f28defcbd8f48de83f4502093ac97149b4da6</id>
<content type='text'>
And start using it elsewhere in the standard library, removing the
copies in the process.

While at it, rewrite the io.WriteString godoc to be more clear, since it
can now make reference to the defined interface.

Fixes #27946.

Change-Id: Id5ba223c09c19e5fb49815bd3b1bd3254fc786f3
Reviewed-on: https://go-review.googlesource.com/c/139457
Run-TryBot: Daniel Martí &lt;mvdan@mvdan.cc&gt;
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
</content>
</entry>
<entry>
<title>strings: select Replacer algorithm and build machine lazily</title>
<updated>2018-08-21T02:50:58Z</updated>
<author>
<name>Brad Fitzpatrick</name>
<email>bradfitz@golang.org</email>
</author>
<published>2018-08-02T20:02:24Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=c544e0fbdb7344b2025650aaf70bab3b09d72003'/>
<id>urn:sha1:c544e0fbdb7344b2025650aaf70bab3b09d72003</id>
<content type='text'>
Saves 22KB of memory in stdlib packages.

Updates #26775

Change-Id: Ia19fe7aff61f6e2ddd83cd35969d7ff94526591f
Reviewed-on: https://go-review.googlesource.com/127661
Run-TryBot: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
</content>
</entry>
</feed>
