Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Issue 7349: Optimized special case of not matching the last char of the needle in BM string match. (Closed)

Created:
12 years, 2 months ago by Lasse Reichstein
Modified:
9 years, 6 months ago
CC:
v8-dev
Visibility:
Public.

Description

* Special case for last char in BM-match * Patch from Erik Corry to separate BM-algoritm into special case functions. Also changes condition for bailing out of simple search. * Added simple search with no bailout for very short patterns.

Patch Set 1 #

Patch Set 2 : Adresses review comments. #

Patch Set 3 : Now including all changes. #

Patch Set 4 : Now really including all changes. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+129 lines, -57 lines) Patch
M src/runtime.cc View 1 8 chunks +129 lines, -57 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Lasse Reichstein
Your patch, and some special cases.
12 years, 2 months ago (2008-10-15 14:20:01 UTC) #1
Lasse Reichstein
Small code-review, reassigned due to vacation.
12 years, 2 months ago (2008-10-16 11:04:48 UTC) #2
Mads Ager (chromium)
LGTM http://codereview.chromium.org/7349/diff/1/2 File src/runtime.cc (right): http://codereview.chromium.org/7349/diff/1/2#newcode1263 Line 1263: if (pat.length() < 0) { I don't ...
12 years, 2 months ago (2008-10-16 11:14:15 UTC) #3
Lasse Reichstein
12 years, 2 months ago (2008-10-16 11:55:50 UTC) #4
Ignore extra patches, they are, contrary to what I thought, identical.

http://codereview.chromium.org/7349/diff/1/2
File src/runtime.cc (right):

http://codereview.chromium.org/7349/diff/1/2#newcode1263
Line 1263: if (pat.length() < 0) {
On 2008/10/16 11:14:15, Mads Ager wrote:
> I don't understand this.  You assert above that pat.length() > 1, so how can
you
> get to a situation where pat.length() < 0?  I guess you mean to put in some

Mea culpa. Should be 4, but I temporarily changed it to 1000 and 0 test
performance with and without, and uploaded the changelist before I set it back.
Good catch. 
> other constant here (please name the constant when you do).

Powered by Google App Engine
This is Rietveld 408576698