| commit | 5df1cf0475cd5b27601cfe95d94c5e4365f999f3 | [log] [tgz] |
|---|---|---|
| author | Rob Pike <r@golang.org> | Fri Mar 11 16:24:09 2011 -0800 |
| committer | Rob Pike <r@golang.org> | Fri Mar 11 16:24:09 2011 -0800 |
| tree | d728071a78a676f54bd36c07ba5fb93e6a3f8391 | |
| parent | c734b50b11c6d9e46856c51870dc4bee94b8f18c [diff] |
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 https://golang.org/cl/4279045