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

Issue 91750044: code review 91750044: net: avoid array copy when shuffling SRV records (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 10 months ago by ruiu
Modified:
10 years, 9 months ago
Reviewers:
bradfitz
CC:
golang-codereviews, bradfitz
Visibility:
Public.

Description

net: avoid array copy when shuffling SRV records We don't need to shift array elements to shuffle them. We just have to swap a selected element with 0th element.

Patch Set 1 #

Patch Set 2 : diff -r 74a1371ffaf1 https://code.google.com/p/go #

Patch Set 3 : diff -r 6146799f32ed https://code.google.com/p/go #

Patch Set 4 : diff -r 6146799f32ed https://code.google.com/p/go #

Total comments: 3

Patch Set 5 : diff -r 2dc2bf98e6e3 https://code.google.com/p/go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -3 lines) Patch
M src/pkg/net/dnsclient.go View 1 1 chunk +1 line, -3 lines 0 comments Download

Messages

Total messages: 6
ruiu
Hello golang-codereviews@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go
10 years, 9 months ago (2014-06-11 03:21:24 UTC) #1
ruiu
Ping.
10 years, 9 months ago (2014-06-16 23:02:39 UTC) #2
bradfitz
LGTM https://codereview.appspot.com/91750044/diff/60001/src/pkg/net/dnsclient.go File src/pkg/net/dnsclient.go (right): https://codereview.appspot.com/91750044/diff/60001/src/pkg/net/dnsclient.go#newcode192 src/pkg/net/dnsclient.go:192: for sum > 0 && len(addrs) > 1 ...
10 years, 9 months ago (2014-06-16 23:52:22 UTC) #3
ruiu
https://codereview.appspot.com/91750044/diff/60001/src/pkg/net/dnsclient.go File src/pkg/net/dnsclient.go (right): https://codereview.appspot.com/91750044/diff/60001/src/pkg/net/dnsclient.go#newcode192 src/pkg/net/dnsclient.go:192: for sum > 0 && len(addrs) > 1 { ...
10 years, 9 months ago (2014-06-17 00:34:39 UTC) #4
bradfitz
https://codereview.appspot.com/91750044/diff/60001/src/pkg/net/dnsclient.go File src/pkg/net/dnsclient.go (right): https://codereview.appspot.com/91750044/diff/60001/src/pkg/net/dnsclient.go#newcode192 src/pkg/net/dnsclient.go:192: for sum > 0 && len(addrs) > 1 { ...
10 years, 9 months ago (2014-06-17 00:40:22 UTC) #5
ruiu
10 years, 9 months ago (2014-06-17 01:00:30 UTC) #6
*** Submitted as https://code.google.com/p/go/source/detail?r=6a85be121cae ***

net: avoid array copy when shuffling SRV records

We don't need to shift array elements to shuffle them.
We just have to swap a selected element with 0th element.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://codereview.appspot.com/91750044
Sign in to reply to this message.

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