Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(932)

Issue 14488043: code review 14488043: encoding/binary: faster littleEndian on i386/amd64 and ...

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 6 months ago by funny.falcon
Modified:
10 years, 6 months ago
Reviewers:
Visibility:
Public.

Description

encoding/binary: faster littleEndian on i386/amd64 and varint Make use of unsafe.Pointer casting on i386/amd for little endian read/write. (change of BigEndian speed is benchmark noise) Unroll a bit PutUvarint. benchmark old ns/op new ns/op delta BenchmarkReadSlice1000Int32sBE 10640 10679 +0.37% BenchmarkReadSlice1000Int32sLE 10515 9096 -13.50% BenchmarkReadStructBE 2068 2163 +4.59% BenchmarkReadStructLE 2073 2070 -0.14% BenchmarkReadIntsBE 808 797 -1.36% BenchmarkReadIntsLE 807 780 -3.35% BenchmarkWriteIntsBE 1445 1474 +2.01% BenchmarkWriteIntsLE 1448 1422 -1.80% BenchmarkWriteSlice1000Int32sBE 10661 10660 -0.01% BenchmarkWriteSlice1000Int32sLE 10549 9242 -12.39% BenchmarkPutUvarint32 31 29 -6.62% BenchmarkPutUvarint64 89 86 -3.36% benchmark old MB/s new MB/s speedup BenchmarkReadSlice1000Int32sBE 375.92 374.54 1.00x BenchmarkReadSlice1000Int32sLE 380.40 439.73 1.16x BenchmarkReadStructBE 33.83 32.35 0.96x BenchmarkReadStructLE 33.77 33.82 1.00x BenchmarkReadIntsBE 37.13 37.63 1.01x BenchmarkReadIntsLE 37.14 38.43 1.03x BenchmarkWriteIntsBE 20.76 20.34 0.98x BenchmarkWriteIntsLE 20.71 21.09 1.02x BenchmarkWriteSlice1000Int32sBE 375.16 375.23 1.00x BenchmarkWriteSlice1000Int32sLE 379.16 432.80 1.14x BenchmarkPutUvarint32 126.30 135.05 1.07x BenchmarkPutUvarint64 89.51 92.65 1.04x

Patch Set 1 #

Patch Set 2 : diff -r d2cb80eac1ac https://code.google.com/p/go #

Patch Set 3 : diff -r d2cb80eac1ac https://code.google.com/p/go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+194 lines, -39 lines) Patch
M src/pkg/encoding/binary/binary.go View 1 1 chunk +0 lines, -27 lines 0 comments Download
M src/pkg/encoding/binary/binary_test.go View 1 6 chunks +102 lines, -5 lines 0 comments Download
A src/pkg/encoding/binary/little_endian.go View 1 1 chunk +33 lines, -0 lines 0 comments Download
A src/pkg/encoding/binary/little_endian_intel.go View 1 1 chunk +27 lines, -0 lines 0 comments Download
M src/pkg/encoding/binary/varint.go View 1 1 chunk +32 lines, -7 lines 0 comments Download

Messages

Total messages: 4
funny.falcon
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go
10 years, 6 months ago (2013-10-07 12:42:54 UTC) #1
0xjnml
On 2013/10/07 12:42:54, funny.falcon wrote: > Hello mailto:golang-dev@googlegroups.com (cc: mailto:golang-dev@googlegroups.com), > > I'd like you ...
10 years, 6 months ago (2013-10-07 12:53:15 UTC) #2
r
encoding/binary will not use unsafe. Also, we're in a freeze so changes like this must ...
10 years, 6 months ago (2013-10-07 16:34:21 UTC) #3
r
10 years, 6 months ago (2013-10-15 20:32:40 UTC) #4

          
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b