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

Issue 4279045: code review 4279045: gob: use bufio on the decode to avoid a system call on ... (Closed)

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

Description

gob: use bufio on the decode to avoid a system call on each read. Add a benchmark. BenchmarkEndToEndPipe gives 14.3microseconds/op before, 13.1microseconds/op after, or about 76e3 round trips per second through the kernel. With a bytes buffer, and therefore no system calls for I/O, the numbers go to 7.3microseconds/op, or about 137e3 round trips per second.

Patch Set 1 #

Patch Set 2 : diff -r cba623104224 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+38 lines, -1 line) Patch
M src/pkg/gob/decoder.go View 2 chunks +2 lines, -1 line 0 comments Download
M src/pkg/gob/encoder_test.go View 1 chunk +36 lines, -0 lines 0 comments Download

Messages

Total messages: 3
r
Hello rsc (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
14 years, 2 months ago (2011-03-12 00:19:24 UTC) #1
rsc
LGTM
14 years, 2 months ago (2011-03-12 00:20:12 UTC) #2
r
14 years, 2 months ago (2011-03-12 00:24:12 UTC) #3
*** Submitted as http://code.google.com/p/go/source/detail?r=38937f4e4d1f ***

gob: use bufio on the decode to avoid a system call on each read.
Add a benchmark.
BenchmarkEndToEndPipe gives 14.3microseconds/op before,
13.1microseconds/op after, or about 76e3 round trips per second
through the kernel.
With a bytes buffer, and therefore no system calls for I/O, the
numbers go to 7.3microseconds/op, or about 137e3 round trips
per second.

R=rsc
CC=golang-dev
http://codereview.appspot.com/4279045
Sign in to reply to this message.

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