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

Issue 6709027: Make Script.prototype.nameOrSourceURL use indexOf search first before trying to match with a RegExp. (Closed)

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

Description

Make Script.prototype.nameOrSourceURL use indexOf search first before trying to match with a RegExp. This should use Boyer-Moore search with a long string, which is potentially faster than RegExp search. The target string is typically, but not guaranteed, at the end of the source, so for long sources, there will be a lot of characters to skip. Committed: http://code.google.com/p/v8/source/detail?r=7263

Patch Set 1 #

Total comments: 1

Patch Set 2 : Address review comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -4 lines) Patch
M src/messages.js View 1 1 chunk +18 lines, -4 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Lasse Reichstein
9 years, 9 months ago (2011-03-18 13:02:45 UTC) #1
Vitaly Repeshko
9 years, 9 months ago (2011-03-18 13:35:46 UTC) #2
LGTM

http://codereview.chromium.org/6709027/diff/1/src/messages.js
File src/messages.js (right):

http://codereview.chromium.org/6709027/diff/1/src/messages.js#newcode507
src/messages.js:507: var matchInfo = new InternalArray(CAPTURE(3) + 1);
Please document why "CAPTURE(3) + 1".

Powered by Google App Engine
This is Rietveld 408576698