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

Issue 1988009: RegExp: Remove use of 16-bit immediates on ia32/x64. (Closed)

Created:
10 years, 7 months ago by Lasse Reichstein
Modified:
9 years, 6 months ago
Reviewers:
Erik Corry
CC:
v8-dev
Visibility:
Public.

Description

RegExp: Remove use of 16-bit immediates on ia32/x64. Also check more than one character at a time. 16-bit immediates requires a prefix that changes the length of the instruction. This causes predecoder mispredictions and subsequent pipeline stalls. Also removed redundant "atStart" local variable which is equivalent to startIndex == 0.

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+140 lines, -49 lines) Patch
M src/ia32/regexp-macro-assembler-ia32.h View 1 chunk +1 line, -2 lines 0 comments Download
M src/ia32/regexp-macro-assembler-ia32.cc View 9 chunks +61 lines, -23 lines 4 comments Download
M src/x64/regexp-macro-assembler-x64.h View 1 chunk +1 line, -2 lines 0 comments Download
src/x64/regexp-macro-assembler-x64.cc View 7 chunks +77 lines, -22 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Lasse Reichstein
RegExp optimization. The one-character first test, before starting to test multiple characters at a time, ...
10 years, 7 months ago (2010-05-10 12:29:29 UTC) #1
Erik Corry
There's a change in here to handle start-of-string differently. That should be mentioned in the ...
10 years, 7 months ago (2010-05-10 20:23:47 UTC) #2
Lasse Reichstein
10 years, 7 months ago (2010-05-11 07:28:47 UTC) #3
The removal of atStart doesn't change performance noticably. The test code is
still the same, we only save ~five instructions of initialization.

http://codereview.chromium.org/1988009/diff/1/2
File src/ia32/regexp-macro-assembler-ia32.cc (right):

http://codereview.chromium.org/1988009/diff/1/2#newcode250
src/ia32/regexp-macro-assembler-ia32.cc:250: for (int i = 0, n = str.length(); i
< n;) {
Bugger. Good catch!

http://codereview.chromium.org/1988009/diff/1/2#newcode274
src/ia32/regexp-macro-assembler-ia32.cc:274: // flushes.
Quite possible, and done.
(Intel, Section 3.4.2.3, "Length-Changing Prefixes (LCP)").

Powered by Google App Engine
This is Rietveld 408576698