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

Issue 111230043: code review 111230043: encoding/gob: speedup encoding (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 9 months ago by dvyukov
Modified:
9 years, 7 months ago
Reviewers:
r, rsc, golang-codereviews
Visibility:
Public.

Description

encoding/gob: speedup encoding Replace typeLock with copy-on-write map. Use double-checked locking when creating encoder program. benchmark old ns/op new ns/op delta BenchmarkEndToEndPipe 7722 7709 -0.17% BenchmarkEndToEndPipe-2 5114 4344 -15.06% BenchmarkEndToEndPipe-4 3192 2429 -23.90% BenchmarkEndToEndPipe-8 1833 1438 -21.55% BenchmarkEndToEndPipe-16 1332 983 -26.20% BenchmarkEndToEndPipe-32 1444 675 -53.25% BenchmarkEndToEndByteBuffer 6474 6019 -7.03% BenchmarkEndToEndByteBuffer-2 4280 2810 -34.35% BenchmarkEndToEndByteBuffer-4 2264 1774 -21.64% BenchmarkEndToEndByteBuffer-8 1275 979 -23.22% BenchmarkEndToEndByteBuffer-16 1257 753 -40.10% BenchmarkEndToEndByteBuffer-32 1342 644 -52.01% BenchmarkEndToEndArrayByteBuffer 727725 671349 -7.75% BenchmarkEndToEndArrayByteBuffer-2 394079 320473 -18.68% BenchmarkEndToEndArrayByteBuffer-4 211785 178175 -15.87% BenchmarkEndToEndArrayByteBuffer-8 141003 118857 -15.71% BenchmarkEndToEndArrayByteBuffer-16 139249 86367 -37.98% BenchmarkEndToEndArrayByteBuffer-32 144128 73454 -49.04% Benchmarks are from: https://codereview.appspot.com/115960043/

Patch Set 1 #

Patch Set 2 : diff -r 9562b65a3c51 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 3 : diff -r 9562b65a3c51 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 4 : diff -r a622a4ff09da https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 5 : diff -r a622a4ff09da https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 6 : diff -r 163fae12c83b https://dvyukov%40google.com@code.google.com/p/go/ #

Total comments: 12

Patch Set 7 : diff -r 3f916fdee080 https://dvyukov%40google.com@code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+88 lines, -65 lines) Patch
M src/pkg/encoding/gob/encode.go View 7 chunks +37 lines, -38 lines 0 comments Download
M src/pkg/encoding/gob/encoder.go View 2 chunks +0 lines, -4 lines 0 comments Download
M src/pkg/encoding/gob/type.go View 3 chunks +51 lines, -23 lines 0 comments Download

Messages

Total messages: 7
dvyukov
Hello golang-codereviews@googlegroups.com (cc: r@golang.org), I'd like you to review this change to https://dvyukov%40google.com@code.google.com/p/go/
9 years, 9 months ago (2014-07-18 10:39:57 UTC) #1
r
NOT LGTM I just spent a week getting unsafe out of this package.
9 years, 9 months ago (2014-07-18 18:06:12 UTC) #2
rsc
This certainly looks better than using unsafe. However, I am not sure why it is ...
9 years, 8 months ago (2014-08-05 14:18:24 UTC) #3
dvyukov
On 2014/08/05 14:18:24, rsc wrote: > This certainly looks better than using unsafe. However, I ...
9 years, 8 months ago (2014-08-05 14:47:11 UTC) #4
r
https://codereview.appspot.com/111230043/diff/100001/src/pkg/encoding/gob/encode.go File src/pkg/encoding/gob/encode.go (right): https://codereview.appspot.com/111230043/diff/100001/src/pkg/encoding/gob/encode.go#newcode615 src/pkg/encoding/gob/encode.go:615: info, err1 := getTypeInfo(ut) s/err1/err/ some dreg not doubt. ...
9 years, 8 months ago (2014-08-05 21:06:13 UTC) #5
dvyukov
https://codereview.appspot.com/111230043/diff/100001/src/pkg/encoding/gob/encode.go File src/pkg/encoding/gob/encode.go (right): https://codereview.appspot.com/111230043/diff/100001/src/pkg/encoding/gob/encode.go#newcode615 src/pkg/encoding/gob/encode.go:615: info, err1 := getTypeInfo(ut) On 2014/08/05 21:06:13, r wrote: ...
9 years, 8 months ago (2014-08-05 21:34:09 UTC) #6
dvyukov
9 years, 7 months ago (2014-09-17 03:01:23 UTC) #7
recreated as cl/147720043
this is broken after pkg move
Sign in to reply to this message.

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