]> Cypherpunks repositories - gostls13.git/commit
gob: remove a few more allocations.
authorRob Pike <r@golang.org>
Thu, 17 Mar 2011 01:03:13 +0000 (18:03 -0700)
committerRob Pike <r@golang.org>
Thu, 17 Mar 2011 01:03:13 +0000 (18:03 -0700)
commit90f3f917862518bb2e6f302c2ff76c801430d0e5
tree96cde7c6811c63a31ada7d730a1275301c58049b
parent3d1afb76807fa11e56c16cb5008bc64ae5bb84c7
gob: remove a few more allocations.
- use enc.err and dec.err instead of return values in deferred error catcher
- replace io.WriteString with buffer.WriteString

now at:
mallocs per encode of type Bench: 7
mallocs per decode of type Bench: 8

R=rsc
CC=golang-dev
https://golang.org/cl/4277057
src/pkg/gob/codec_test.go
src/pkg/gob/decode.go
src/pkg/gob/decoder.go
src/pkg/gob/encode.go
src/pkg/gob/encoder.go