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

Issue 133200044: code review 133200044: go.crypto/ssh: reuse buffer during WriteExtended

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 4 months ago by dave
Modified:
11 years, 1 month ago
Reviewers:
CC:
golang-codereviews, hanwen-google
Visibility:
Public.

Description

go.crypto/ssh: reuse buffer during WriteExtended It was pointed out on golang-nuts that WriteExtended allocates a large buffer for every call to writePacket. This can be optimised a little without going to the extent of setting up a buffer pool. We don't have great benchmarks of this, but initial tests show benchmark old ns/op new ns/op delta BenchmarkEndToEnd 12417961 12004715 -3.33% BenchmarkMarshalKexInitMsg 10251 10472 +2.16% BenchmarkUnmarshalKexInitMsg 22723 22225 -2.19% BenchmarkMarshalKexDHInitMsg 1301 1285 -1.23% BenchmarkUnmarshalKexDHInitMsg 717 745 +3.91% benchmark old MB/s new MB/s speedup BenchmarkEndToEnd 84.44 87.64 1.04x benchmark old allocs new allocs delta BenchmarkEndToEnd 107 75 -29.91% benchmark old bytes new bytes delta BenchmarkEndToEnd 2616693 1346890 -48.53%

Patch Set 1 #

Patch Set 2 : diff -r 00a7d3b31bbab5795b4a51933c04fc2768242970 https://code.google.com/p/go.crypto #

Patch Set 3 : diff -r 00a7d3b31bbab5795b4a51933c04fc2768242970 https://code.google.com/p/go.crypto #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -8 lines) Patch
M ssh/benchmark_test.go View 1 1 chunk +1 line, -0 lines 0 comments Download
M ssh/channel.go View 1 2 chunks +11 lines, -8 lines 3 comments Download

Messages

Total messages: 5
dave_cheney.net
Hello golang-codereviews@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go.crypto
11 years, 4 months ago (2014-08-30 02:22:40 UTC) #1
hanwen-google
https://codereview.appspot.com/133200044/diff/60001/ssh/channel.go File ssh/channel.go (right): https://codereview.appspot.com/133200044/diff/60001/ssh/channel.go#newcode245 ssh/channel.go:245: packet = packet[0:0:cap(packet)] why not simply packet[:0] ? https://codereview.appspot.com/133200044/diff/60001/ssh/channel.go#newcode247 ...
11 years, 4 months ago (2014-09-03 08:34:06 UTC) #2
hanwen-google
please CC me directly on SSH changes. I don't follow the dev list closely.
11 years, 4 months ago (2014-09-03 08:34:48 UTC) #3
hanwen-google
https://codereview.appspot.com/133200044/diff/60001/ssh/channel.go File ssh/channel.go (right): https://codereview.appspot.com/133200044/diff/60001/ssh/channel.go#newcode251 ssh/channel.go:251: length := len(todo) reuse 'space'
11 years, 4 months ago (2014-09-03 08:42:22 UTC) #4
gobot
11 years, 1 month ago (2014-12-19 05:12:22 UTC) #5
R=close

To the author of this CL:

The Go project has moved to Gerrit Code Review.

If this CL should be continued, please see the latest version of
https://golang.org/doc/contribute.html for instructions on
how to set up Git and the Go project's Gerrit codereview plugin,
and then create a new change with your current code.

If there has been discussion on this CL, please give a link to it
(golang.org/cl/133200044 is best) in the description in your
new CL.

Thanks very much.
Sign in to reply to this message.

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