<feed xmlns='http://www.w3.org/2005/Atom'>
<title>go/src/encoding/binary/binary.go, branch bench-before</title>
<subtitle>Fork of Go programming language with my patches.</subtitle>
<id>http://git.kilabit.info/go/atom?h=bench-before</id>
<link rel='self' href='http://git.kilabit.info/go/atom?h=bench-before'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/'/>
<updated>2023-09-08T19:04:28Z</updated>
<entry>
<title>encoding: modernize Go documentation</title>
<updated>2023-09-08T19:04:28Z</updated>
<author>
<name>Joe Tsai</name>
<email>joetsai@digital-static.net</email>
</author>
<published>2023-09-01T08:54:25Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=dac9b9ddbd5160c5f4552410f5f8281bd5eed38c'/>
<id>urn:sha1:dac9b9ddbd5160c5f4552410f5f8281bd5eed38c</id>
<content type='text'>
Across all encoding packages, linkify declarations if possible.
In some cases, we convert a code block into a bulleted list,
which then further allows for more linkification.

Change-Id: I68fedf362615b34228bab5d4859b7d87d831c570
Reviewed-on: https://go-review.googlesource.com/c/go/+/524977
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Daniel Martí &lt;mvdan@mvdan.cc&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: qiulaidongfeng &lt;2645477756@qq.com&gt;
Reviewed-by: Matthew Dempsky &lt;mdempsky@google.com&gt;
</content>
</entry>
<entry>
<title>encoding/binary: on invalid type return -1 from Size</title>
<updated>2023-06-20T18:28:44Z</updated>
<author>
<name>Ian Lance Taylor</name>
<email>iant@golang.org</email>
</author>
<published>2023-06-20T16:38:39Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=e122ebabb657021964f2bdd31e683ddfa023fd0c'/>
<id>urn:sha1:e122ebabb657021964f2bdd31e683ddfa023fd0c</id>
<content type='text'>
Size is defined as returning -1 if the type is not fixed-size.
Before this CL cases like Size((*[]int)(nil)) would crash.

Fixes #60892

Change-Id: Iee8e20a0aee24b542b78cb4160c3b2c5a3eb02c2
Reviewed-on: https://go-review.googlesource.com/c/go/+/504575
Auto-Submit: Ian Lance Taylor &lt;iant@golang.org&gt;
Run-TryBot: Ian Lance Taylor &lt;iant@golang.org&gt;
Reviewed-by: Robert Griesemer &lt;gri@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Bryan Mills &lt;bcmills@google.com&gt;
</content>
</entry>
<entry>
<title>encoding/binary: add word size to the error message of the failed constraint</title>
<updated>2023-04-04T22:12:53Z</updated>
<author>
<name>Constantin Konstantinidis</name>
<email>constantinkonstantinidis@gmail.com</email>
</author>
<published>2018-05-14T11:50:56Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=2afaa018550ceb42e7a89d1bb53e7fe2d3890377'/>
<id>urn:sha1:2afaa018550ceb42e7a89d1bb53e7fe2d3890377</id>
<content type='text'>
Test added.

Fixes #22860

Change-Id: I08304834a2b7b10b4ac729bf36761692eb4731da
Reviewed-on: https://go-review.googlesource.com/c/go/+/113075
Reviewed-by: Emmanuel Odeke &lt;emmanuel@orijtech.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
Run-TryBot: Ian Lance Taylor &lt;iant@golang.org&gt;
Reviewed-by: Michael Knyszek &lt;mknyszek@google.com&gt;
Auto-Submit: Ian Lance Taylor &lt;iant@golang.org&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</content>
</entry>
<entry>
<title>encoding/binary: add String and GoString method to nativeEndian</title>
<updated>2023-01-30T18:51:09Z</updated>
<author>
<name>cuiweixie</name>
<email>cuiweixie@gmail.com</email>
</author>
<published>2023-01-29T08:42:17Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=848d658c45b185efb6742e51ba261cbba801b6ee'/>
<id>urn:sha1:848d658c45b185efb6742e51ba261cbba801b6ee</id>
<content type='text'>
Updates #57237

Change-Id: Ib626610130cae9c1d1aff5dd2a5035ffde0e127f
Reviewed-on: https://go-review.googlesource.com/c/go/+/463985
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
Run-TryBot: xie cui &lt;523516579@qq.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Run-TryBot: Ian Lance Taylor &lt;iant@google.com&gt;
Auto-Submit: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: Michael Knyszek &lt;mknyszek@google.com&gt;
</content>
</entry>
<entry>
<title>encoding/binary: add AppendByteOrder</title>
<updated>2022-03-02T18:21:38Z</updated>
<author>
<name>Joe Tsai</name>
<email>joetsai@digital-static.net</email>
</author>
<published>2022-02-16T00:59:59Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=986b04c0f12efa1c57293f147a9e734ec71f0363'/>
<id>urn:sha1:986b04c0f12efa1c57293f147a9e734ec71f0363</id>
<content type='text'>
AppendByteOrder specifies new methods for LittleEndian and BigEndian
for appending an unsigned integer to a byte slice.

The performance of AppendXXX methods are slower than PutXXX methods
since the former needs to do a few slice operations,
while the latter is essentially a single integer store.
In practice, existing usages of PutXXX performed slicing operations
around the call such that this cost was present, regardless.

name                           time/op
PutUint16-24                   0.48ns ± 2%
AppendUint16-24                1.54ns ± 1%
PutUint32-24                   0.46ns ± 2%
AppendUint32-24                0.89ns ± 1%
PutUint64-24                   0.46ns ± 2%
AppendUint64-24                0.89ns ± 1%
LittleEndianPutUint16-24       0.47ns ± 2%
LittleEndianAppendUint16-24    1.54ns ± 1%
LittleEndianPutUint32-24       0.45ns ± 3%
LittleEndianAppendUint32-24    0.92ns ± 2%
LittleEndianPutUint64-24       0.46ns ± 3%
LittleEndianAppendUint64-24    0.95ns ± 4%

Fixes #50601

Change-Id: I33d2bbc93a3ce01a9269feac33a2432bc1166ead
Reviewed-on: https://go-review.googlesource.com/c/go/+/386017
Trust: Joseph Tsai &lt;joetsai@digital-static.net&gt;
Trust: Josh Bleecher Snyder &lt;josharian@gmail.com&gt;
Reviewed-by: Josh Bleecher Snyder &lt;josharian@gmail.com&gt;
Run-TryBot: Joseph Tsai &lt;joetsai@digital-static.net&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</content>
</entry>
<entry>
<title>all: gofmt -w -r 'interface{} -&gt; any' src</title>
<updated>2021-12-13T18:45:54Z</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2021-12-01T17:15:45Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=2580d0e08d5e9f979b943758d3c49877fb2324cb'/>
<id>urn:sha1:2580d0e08d5e9f979b943758d3c49877fb2324cb</id>
<content type='text'>
And then revert the bootstrap cmd directories and certain testdata.
And adjust tests as needed.

Not reverting the changes in std that are bootstrapped,
because some of those changes would appear in API docs,
and we want to use any consistently.
Instead, rewrite 'any' to 'interface{}' in cmd/dist for those directories
when preparing the bootstrap copy.

A few files changed as a result of running gofmt -w
not because of interface{} -&gt; any but because they
hadn't been updated for the new //go:build lines.

Fixes #49884.

Change-Id: Ie8045cba995f65bd79c694ec77a1b3d1fe01bb09
Reviewed-on: https://go-review.googlesource.com/c/go/+/368254
Trust: Russ Cox &lt;rsc@golang.org&gt;
Run-TryBot: Russ Cox &lt;rsc@golang.org&gt;
Reviewed-by: Robert Griesemer &lt;gri@golang.org&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</content>
</entry>
<entry>
<title>all: use reflect.{Pointer,PointerTo}</title>
<updated>2021-10-26T14:24:17Z</updated>
<author>
<name>Cuong Manh Le</name>
<email>cuong.manhle.vn@gmail.com</email>
</author>
<published>2021-10-25T16:00:56Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=283d8a3d53ac1c7e1d7e297497480bf0071b6300'/>
<id>urn:sha1:283d8a3d53ac1c7e1d7e297497480bf0071b6300</id>
<content type='text'>
Updates #47651
Updates #48665

Change-Id: I69a87b45a5cad7a07fbd855040cd9935cf874554
Reviewed-on: https://go-review.googlesource.com/c/go/+/358454
Trust: Cuong Manh Le &lt;cuong.manhle.vn@gmail.com&gt;
Run-TryBot: Cuong Manh Le &lt;cuong.manhle.vn@gmail.com&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</content>
</entry>
<entry>
<title>encoding/binary: remove TODO in Write and add benchmarks</title>
<updated>2020-09-23T03:14:03Z</updated>
<author>
<name>zhouzhongyuan</name>
<email>zhouzhongyuan96@gmail.com</email>
</author>
<published>2020-08-05T07:08:54Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=83bc1ed3165e31d1fbeb1e6594373dc11b6ae0a4'/>
<id>urn:sha1:83bc1ed3165e31d1fbeb1e6594373dc11b6ae0a4</id>
<content type='text'>
Benchmarks:
goos: linux
goarch: amd64
BenchmarkReadSlice1000Uint8s-8           4097088               296 ns/op        3381.06 MB/s
BenchmarkWriteSlice1000Uint8s-8          4372588               271 ns/op        3694.96 MB/s

Change-Id: I5b6ef0da5052e3381ee9c714bbff541c11ed0259
Reviewed-on: https://go-review.googlesource.com/c/go/+/246837
Run-TryBot: Alberto Donizetti &lt;alb.donizetti@gmail.com&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Alberto Donizetti &lt;alb.donizetti@gmail.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
Trust: Alberto Donizetti &lt;alb.donizetti@gmail.com&gt;
</content>
</entry>
<entry>
<title>encoding/binary: add float support to fast path</title>
<updated>2019-11-08T18:35:59Z</updated>
<author>
<name>Martin Garton</name>
<email>garton@gmail.com</email>
</author>
<published>2019-09-30T09:27:38Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=7714dcacbca1961543fbad0c8bc2a2afc7baaaee'/>
<id>urn:sha1:7714dcacbca1961543fbad0c8bc2a2afc7baaaee</id>
<content type='text'>
This adds float type support to the main switch blocks in Read and
Write, instead of falling back to reflection. This gives a considerable
speedup for the float types:

ReadFloats-8                 129ns ± 9%       70ns ± 8%   -46.02%  (p=0.001 n=7+7)
WriteFloats-8                131ns ± 6%       86ns ±11%   -34.59%  (p=0.001 n=7+7)
ReadSlice1000Float32s-8     14.6µs ±14%      4.8µs ±12%   -67.29%  (p=0.001 n=7+7)
WriteSlice1000Float32s-8    16.4µs ±20%      4.7µs ± 8%   -71.01%  (p=0.001 n=7+7)

Change-Id: I0be99d068b07d10dd6eb1137b45eff6f7c216b87
GitHub-Last-Rev: 4ff326e99ca35977d819f0ba29c10d9efc7e811c
GitHub-Pull-Request: golang/go#31803
Reviewed-on: https://go-review.googlesource.com/c/go/+/174959
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</content>
</entry>
<entry>
<title>encoding/binary: make Read return an error when data is not a pointer</title>
<updated>2019-11-08T18:00:31Z</updated>
<author>
<name>Udalov Max</name>
<email>re.udalov@gmail.com</email>
</author>
<published>2019-07-03T20:31:50Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=c444ec308506463bd4ab3226c6aab55746347780'/>
<id>urn:sha1:c444ec308506463bd4ab3226c6aab55746347780</id>
<content type='text'>
Make binary.Read return an error when passed `data` argument is not
a pointer to a fixed-size value or a slice of fixed-size values.

Fixes #32927

Change-Id: I04f48be55fe9b0cc66c983d152407d0e42cbcd95
Reviewed-on: https://go-review.googlesource.com/c/go/+/184957
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</content>
</entry>
</feed>
