aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/encoding/gob/codec_test.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2014-07-01 14:19:27 -0400
committerRuss Cox <rsc@golang.org>2014-07-01 14:19:27 -0400
commite4bc3c462bedb253cb73b2dc290e200d1ffde9fe (patch)
treea1a096437d9fd13c3ad290f4b8c1dc0aaedae833 /src/pkg/encoding/gob/codec_test.go
parentdddc8b193fdd548061bb9f77b9395e6417a97cb6 (diff)
downloadgo-e4bc3c462bedb253cb73b2dc290e200d1ffde9fe.tar.xz
encoding/gob: fewer decAlloc calls
Move decAlloc calls a bit higher in the call tree. Cleans code marginally, improves speed marginally. The benchmarks are noisy but the median time from 20 consective 1-second runs improves by about 2%. LGTM=r R=r CC=golang-codereviews https://golang.org/cl/105530043
Diffstat (limited to 'src/pkg/encoding/gob/codec_test.go')
-rw-r--r--src/pkg/encoding/gob/codec_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/encoding/gob/codec_test.go b/src/pkg/encoding/gob/codec_test.go
index c7b2567ca0..4f17a28931 100644
--- a/src/pkg/encoding/gob/codec_test.go
+++ b/src/pkg/encoding/gob/codec_test.go
@@ -323,7 +323,7 @@ func execDec(typ string, instr *decInstr, state *decoderState, t *testing.T, val
if v+state.fieldnum != 6 {
t.Fatalf("decoding field number %d, got %d", 6, v+state.fieldnum)
}
- instr.op(instr, state, value)
+ instr.op(instr, state, value.Elem())
state.fieldnum = 6
}