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

Issue 3720042: code review 3720042: suffixarray: implememted FindAllIndex regexp search (Closed)

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

Description

suffixarray: implememted FindAllIndex regexp search Implementation uses fast suffixarray lookup to find initial matches if the regular expression starts with a suitable prefix without meta characters.

Patch Set 1 #

Patch Set 2 : code review 3720042: suffixarray: implememted FindAllIndex regexp search #

Patch Set 3 : code review 3720042: suffixarray: implememted FindAllIndex regexp search #

Patch Set 4 : code review 3720042: suffixarray: implemented FindAllIndex regexp search #

Total comments: 11

Patch Set 5 : code review 3720042: suffixarray: implemented FindAllIndex regexp search #

Patch Set 6 : code review 3720042: suffixarray: implemented FindAllIndex regexp search #

Patch Set 7 : code review 3720042: suffixarray: implemented FindAllIndex regexp search #

Patch Set 8 : code review 3720042: suffixarray: implemented FindAllIndex regexp search #

Patch Set 9 : code review 3720042: suffixarray: implemented FindAllIndex regexp search #

Patch Set 10 : code review 3720042: suffixarray: implemented FindAllIndex regexp search #

Patch Set 11 : code review 3720042: suffixarray: implememted FindAllIndex regexp search #

Patch Set 12 : code review 3720042: suffixarray: implememted FindAllIndex regexp search #

Total comments: 13

Patch Set 13 : code review 3720042: suffixarray: implememted FindAllIndex regexp search #

Patch Set 14 : code review 3720042: suffixarray: implememted FindAllIndex regexp search #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+216 lines, -50 lines) Patch
M src/pkg/index/suffixarray/suffixarray.go View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +119 lines, -7 lines 4 comments Download
M src/pkg/index/suffixarray/suffixarray_test.go View 1 2 3 4 5 6 7 8 9 10 8 chunks +97 lines, -43 lines 0 comments Download

Messages

Total messages: 18
gri
Hello r, rsc (cc: golang-dev@googlegroups.com), I'd like you to review this change.
14 years, 6 months ago (2010-12-17 05:04:34 UTC) #1
r
There's a typo in the change description. "Implemented" should have an 'n'.
14 years, 6 months ago (2010-12-17 05:47:56 UTC) #2
gri
PTAL - fixed this and several other documentation gotcha's On Thu, Dec 16, 2010 at ...
14 years, 6 months ago (2010-12-17 05:54:21 UTC) #3
r
http://codereview.appspot.com/3720042/diff/8001/src/pkg/index/suffixarray/suffixarray.go File src/pkg/index/suffixarray/suffixarray.go (right): http://codereview.appspot.com/3720042/diff/8001/src/pkg/index/suffixarray/suffixarray.go#newcode96 src/pkg/index/suffixarray/suffixarray.go:96: // If the regular expression has a prefix of ...
14 years, 6 months ago (2010-12-17 05:59:14 UTC) #4
gri
On Thu, Dec 16, 2010 at 9:59 PM, <r@golang.org> wrote: > > > http://codereview.appspot.com/3720042/diff/8001/src/pkg/index/suffixarray/suffixarray.go > ...
14 years, 6 months ago (2010-12-17 06:36:04 UTC) #5
r
my point is that for this application, an empty string is pointless and expensive to ...
14 years, 6 months ago (2010-12-17 06:43:03 UTC) #6
gri
On Thu, Dec 16, 2010 at 10:42 PM, Rob 'Commander' Pike <r@golang.org> wrote: > my ...
14 years, 6 months ago (2010-12-17 06:56:41 UTC) #7
r
good point. i was thinking of this as being inside godoc, but as a library ...
14 years, 6 months ago (2010-12-17 08:01:02 UTC) #8
gri
Hello r, rsc (cc: golang-dev@googlegroups.com), I'd like you to review this change.
14 years, 6 months ago (2010-12-17 19:48:02 UTC) #9
rsc
http://codereview.appspot.com/3720042/diff/31002/src/pkg/index/suffixarray/suffixarray.go File src/pkg/index/suffixarray/suffixarray.go (right): http://codereview.appspot.com/3720042/diff/31002/src/pkg/index/suffixarray/suffixarray.go#newcode93 src/pkg/index/suffixarray/suffixarray.go:93: // matches of the entire regular expression r, where ...
14 years, 6 months ago (2010-12-17 19:56:14 UTC) #10
r
http://codereview.appspot.com/3720042/diff/31002/src/pkg/index/suffixarray/suffixarray.go File src/pkg/index/suffixarray/suffixarray.go (right): http://codereview.appspot.com/3720042/diff/31002/src/pkg/index/suffixarray/suffixarray.go#newcode122 src/pkg/index/suffixarray/suffixarray.go:122: if complete && prefix != "" { i think ...
14 years, 6 months ago (2010-12-17 19:58:25 UTC) #11
gri
Hello r, rsc (cc: golang-dev@googlegroups.com), Please take another look.
14 years, 6 months ago (2010-12-17 21:13:23 UTC) #12
gri
http://codereview.appspot.com/3720042/diff/31002/src/pkg/index/suffixarray/suffixarray.go File src/pkg/index/suffixarray/suffixarray.go (right): http://codereview.appspot.com/3720042/diff/31002/src/pkg/index/suffixarray/suffixarray.go#newcode93 src/pkg/index/suffixarray/suffixarray.go:93: // matches of the entire regular expression r, where ...
14 years, 6 months ago (2010-12-17 21:13:26 UTC) #13
gri
On Fri, Dec 17, 2010 at 11:58 AM, <r@golang.org> wrote: > > > http://codereview.appspot.com/3720042/diff/31002/src/pkg/index/suffixarray/suffixarray.go > ...
14 years, 6 months ago (2010-12-17 21:18:38 UTC) #14
r
LGTM http://codereview.appspot.com/3720042/diff/44001/src/pkg/index/suffixarray/suffixarray.go File src/pkg/index/suffixarray/suffixarray.go (right): http://codereview.appspot.com/3720042/diff/44001/src/pkg/index/suffixarray/suffixarray.go#newcode162 src/pkg/index/suffixarray/suffixarray.go:162: // the indices of possible complete matches; use ...
14 years, 6 months ago (2010-12-17 21:37:57 UTC) #15
rsc
LGTM http://codereview.appspot.com/3720042/diff/44001/src/pkg/index/suffixarray/suffixarray.go File src/pkg/index/suffixarray/suffixarray.go (right): http://codereview.appspot.com/3720042/diff/44001/src/pkg/index/suffixarray/suffixarray.go#newcode92 src/pkg/index/suffixarray/suffixarray.go:92: // FindAllIndex returns a list of at most ...
14 years, 6 months ago (2010-12-17 21:43:25 UTC) #16
gri
*** Submitted as http://code.google.com/p/go/source/detail?r=23006c94f1aa *** suffixarray: implememted FindAllIndex regexp search Implementation uses fast suffixarray lookup ...
14 years, 6 months ago (2010-12-17 22:00:48 UTC) #17
gri
14 years, 6 months ago (2010-12-17 22:01:23 UTC) #18
On Fri, Dec 17, 2010 at 1:43 PM, <rsc@golang.org> wrote:

> LGTM
>
>
>
>
>
http://codereview.appspot.com/3720042/diff/44001/src/pkg/index/suffixarray/su...
> File src/pkg/index/suffixarray/suffixarray.go (right):
>
>
>
http://codereview.appspot.com/3720042/diff/44001/src/pkg/index/suffixarray/su...
> src/pkg/index/suffixarray/suffixarray.go:92: // FindAllIndex returns a
> list of at most n non-overlapping successive
> This comment should mention that they are not necessarily the first n.
>
Done.

>
>
>
http://codereview.appspot.com/3720042/diff/44001/src/pkg/index/suffixarray/su...
> src/pkg/index/suffixarray/suffixarray.go:156: // worst-case scenario: no
> literal prefix
> might as well move above if complete && prefix != "".
> then the if simplifies and this code doesn't have to worry
> about Lookup being different

Done.

>
>
> http://codereview.appspot.com/3720042/
>
Sign in to reply to this message.

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