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

Issue 103700043: code review 103700043: encoding/gob: simplify allocation in decode. (Closed)

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

Description

encoding/gob: simplify allocation in decode. The old code's structure needed to track indirections because of the use of unsafe. That is no longer necessary, so we can remove all that tracking. The code cleans up considerably but is a little slower. We may be able to recover that performance drop. I believe the code quality improvement is worthwhile regardless. BenchmarkEndToEndPipe 5610 5780 +3.03% BenchmarkEndToEndByteBuffer 3156 3222 +2.09%

Patch Set 1 #

Total comments: 1

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

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+132 lines, -243 lines) Patch
M src/pkg/encoding/gob/codec_test.go View 1 19 chunks +19 lines, -19 lines 0 comments Download
M src/pkg/encoding/gob/decode.go View 1 34 chunks +113 lines, -224 lines 1 comment Download

Messages

Total messages: 5
r
Hello rsc (cc: golang-codereviews@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go
10 years, 9 months ago (2014-06-30 21:50:14 UTC) #1
rsc
LGTM https://codereview.appspot.com/103700043/diff/1/src/pkg/encoding/gob/decode.go File src/pkg/encoding/gob/decode.go (right): https://codereview.appspot.com/103700043/diff/1/src/pkg/encoding/gob/decode.go#newcode145 src/pkg/encoding/gob/decode.go:145: func decIndirect(pv reflect.Value) reflect.Value { This is now ...
10 years, 9 months ago (2014-06-30 22:03:41 UTC) #2
r
Nice idea. Removing decIndirect also recovers almost half of the performance drop.
10 years, 9 months ago (2014-06-30 22:43:25 UTC) #3
r
*** Submitted as https://code.google.com/p/go/source/detail?r=c31a70f2f542 *** encoding/gob: simplify allocation in decode. The old code's structure needed ...
10 years, 9 months ago (2014-06-30 22:47:14 UTC) #4
dave_cheney.net
10 years, 9 months ago (2014-07-01 12:53:28 UTC) #5
Message was sent while issue was closed.
https://codereview.appspot.com/103700043/diff/20001/src/pkg/encoding/gob/deco...
File src/pkg/encoding/gob/decode.go (right):

https://codereview.appspot.com/103700043/diff/20001/src/pkg/encoding/gob/deco...
src/pkg/encoding/gob/decode.go:380: //	println(value.Kind() == reflect.Ptr)
left over debugging.
Sign in to reply to this message.

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