Can you please upload the latest version sync'ed against the repository? It appears that it ...
14 years, 4 months ago
(2010-11-11 23:05:07 UTC)
#2
Can you please upload the latest version sync'ed against the repository? It
appears that it does the same number of calls of f which is great.
- gri
On Thu, Nov 11, 2010 at 11:06 AM, <rogpeppe@gmail.com> wrote:
> Reviewers: gri,
>
> Message:
> Hello gri (cc: golang-dev@googlegroups.com),
>
> I'd like you to review this change.
>
>
> Description:
> sort: simplify semantics of Search.
> As discussed earlier.
>
> Please review this at http://codereview.appspot.com/3025042/
>
> Affected files:
> M src/pkg/sort/search.go
> M src/pkg/sort/search_test.go
>
>
>
PTAL (i *hope* i got the merging right) On 11 November 2010 23:04, Robert Griesemer ...
14 years, 4 months ago
(2010-11-11 23:21:21 UTC)
#3
PTAL (i *hope* i got the merging right)
On 11 November 2010 23:04, Robert Griesemer <gri@golang.org> wrote:
> Can you please upload the latest version sync'ed against the repository? It
> appears that it does the same number of calls of f which is great.
> - gri
>
> On Thu, Nov 11, 2010 at 11:06 AM, <rogpeppe@gmail.com> wrote:
>>
>> Reviewers: gri,
>>
>> Message:
>> Hello gri (cc: golang-dev@googlegroups.com),
>>
>> I'd like you to review this change.
>>
>>
>> Description:
>> sort: simplify semantics of Search.
>> As discussed earlier.
>>
>> Please review this at http://codereview.appspot.com/3025042/
>>
>> Affected files:
>> M src/pkg/sort/search.go
>> M src/pkg/sort/search_test.go
>>
>>
>
>
http://codereview.appspot.com/3025042/diff/17001/src/pkg/sort/search.go File src/pkg/sort/search.go (right): http://codereview.appspot.com/3025042/diff/17001/src/pkg/sort/search.go#newcode31 src/pkg/sort/search.go:31: // caller to verify the actual presence by testing ...
14 years, 4 months ago
(2010-11-11 23:44:05 UTC)
#4
http://codereview.appspot.com/3025042/diff/17001/src/pkg/sort/search.go File src/pkg/sort/search.go (right): http://codereview.appspot.com/3025042/diff/17001/src/pkg/sort/search.go#newcode31 src/pkg/sort/search.go:31: // caller to verify the actual presence by testing ...
14 years, 4 months ago
(2010-11-12 06:05:25 UTC)
#5
On 11 November 2010 23:04, Robert Griesemer <gri@golang.org> wrote: >It appears that it does the ...
14 years, 4 months ago
(2010-11-12 06:44:52 UTC)
#6
On 11 November 2010 23:04, Robert Griesemer <gri@golang.org> wrote:
>It appears that it does the same number of calls of f which is great.
that's interesting - i guess the +1 means that the final case,
when i+1==j, comes one iteration sooner.
the new one *is* marginally less efficient than the old...
.075% more calls per search averaged over all the cases
in TestSearchEfficiency. could be worse :-)
On Thu, Nov 11, 2010 at 10:44 PM, roger peppe <rogpeppe@gmail.com> wrote: > On 11 ...
14 years, 4 months ago
(2010-11-12 23:56:14 UTC)
#7
On Thu, Nov 11, 2010 at 10:44 PM, roger peppe <rogpeppe@gmail.com> wrote:
> On 11 November 2010 23:04, Robert Griesemer <gri@golang.org> wrote:
> >It appears that it does the same number of calls of f which is great.
>
> that's interesting - i guess the +1 means that the final case,
> when i+1==j, comes one iteration sooner.
>
> the new one *is* marginally less efficient than the old...
> .075% more calls per search averaged over all the cases
> in TestSearchEfficiency. could be worse :-)
>
Yes, I noticed that in the old implementation, occasionally there is 1 less
than log2(n) iterations. Now it appears to be always log2(n).
- gri
Issue 3025042: code review 3025042: sort: simplify semantics of Search.
(Closed)
Created 14 years, 4 months ago by rog
Modified 14 years, 4 months ago
Reviewers:
Base URL:
Comments: 6