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

Issue 12680046: code review 12680046: encoding/binary: speed up slices of basic type (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 3 months ago by r
Modified:
11 years, 3 months ago
Reviewers:
crawshaw1
CC:
golang-dev, crawshaw1
Visibility:
Public.

Description

encoding/binary: speed up writing slices of integers Simple approach. Still generates garbage, but not as much. benchmark old ns/op new ns/op delta BenchmarkWriteSlice1000Int32s 40260 18791 -53.33% benchmark old MB/s new MB/s speedup BenchmarkWriteSlice1000Int32s 99.35 212.87 2.14x Fixes issue 2634.

Patch Set 1 #

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

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

Patch Set 4 : diff -r b20db4bc66df https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+96 lines, -0 lines) Patch
M src/pkg/encoding/binary/binary.go View 1 1 chunk +37 lines, -0 lines 0 comments Download
M src/pkg/encoding/binary/binary_test.go View 1 2 2 chunks +59 lines, -0 lines 0 comments Download

Messages

Total messages: 7
r
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go/
11 years, 3 months ago (2013-08-09 11:23:38 UTC) #1
r
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 3 months ago (2013-08-09 11:25:40 UTC) #2
crawshaw1
LGTM Several of the slice cases are untested.
11 years, 3 months ago (2013-08-09 11:41:52 UTC) #3
r
Yes, I noticed. I'll add tests. -rob
11 years, 3 months ago (2013-08-09 12:30:09 UTC) #4
r
Hello golang-dev@googlegroups.com, crawshaw@google.com (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 3 months ago (2013-08-09 13:00:59 UTC) #5
crawshaw1
LGTM
11 years, 3 months ago (2013-08-09 13:13:37 UTC) #6
r
11 years, 3 months ago (2013-08-09 13:15:22 UTC) #7
*** Submitted as https://code.google.com/p/go/source/detail?r=0ad6ae7dfb68 ***

encoding/binary: speed up writing slices of integers

Simple approach. Still generates garbage, but not as much.

benchmark                        old ns/op    new ns/op    delta
BenchmarkWriteSlice1000Int32s        40260        18791  -53.33%

benchmark                         old MB/s     new MB/s  speedup
BenchmarkWriteSlice1000Int32s        99.35       212.87    2.14x

Fixes issue 2634.

R=golang-dev, crawshaw
CC=golang-dev
https://codereview.appspot.com/12680046
Sign in to reply to this message.

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