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

Issue 7285030: Special case handling of one char split on an ASCII string. (Closed)

Created:
9 years, 5 months ago by sandholm
Modified:
9 years, 5 months ago
Reviewers:
Lasse Reichstein
CC:
v8-dev
Visibility:
Public.

Description

Special case handling of one char split on an ASCII string.

Patch Set 1 #

Total comments: 4

Patch Set 2 : '' #

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

Messages

Total messages: 3 (0 generated)
sandholm
9 years, 5 months ago (2011-07-01 09:00:21 UTC) #1
Lasse Reichstein
LGTM http://codereview.chromium.org/7285030/diff/1/src/runtime.cc File src/runtime.cc (right): http://codereview.chromium.org/7285030/diff/1/src/runtime.cc#newcode5771 src/runtime.cc:5771: indices->Add(pos++ - subject_start); Don't do side-effects inside an ...
9 years, 5 months ago (2011-07-01 09:18:38 UTC) #2
sandholm
9 years, 5 months ago (2011-07-01 09:26:34 UTC) #3
http://codereview.chromium.org/7285030/diff/1/src/runtime.cc
File src/runtime.cc (right):

http://codereview.chromium.org/7285030/diff/1/src/runtime.cc#newcode5771
src/runtime.cc:5771: indices->Add(pos++ - subject_start);
On 2011/07/01 09:18:38, Lasse Reichstein wrote:
> Don't do side-effects inside an argument. Just put 'pos++;' or 'pos += 1;' on
> the next line.

Done.

http://codereview.chromium.org/7285030/diff/1/src/runtime.cc#newcode5775
src/runtime.cc:5775: StringSearch<PatternChar, SubjectChar> search(isolate,
pattern);
On 2011/07/01 09:18:38, Lasse Reichstein wrote:
> StringSearch::Search does use memchr for this case too, so we are only saving
> the call overhead.
Yes.

Powered by Google App Engine
This is Rietveld 408576698