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

Issue 2539093002: [runtime] Port simple String.prototype.indexOf cases to TF Builtin (Closed)

Created:
4 years ago by Camillo Bruni
Modified:
4 years ago
CC:
v8-reviews_googlegroups.com
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[runtime] Port simple String.prototype.indexOf cases to TF Builtin Many websites use simple calls to String.prototype.indexOf with either a one character ASCII needle or needles bigger than the search string. This CL adds a TFJ builtin for these simple cases, giving up to factor 5 speedup. Drive-by-fix: Add default Object type to Arguments.at BUG= Review-Url: https://codereview.chromium.org/2539093002 Cr-Commit-Position: refs/heads/master@{#41760} Committed: https://chromium.googlesource.com/v8/v8/+/89f159b0420d643ecc78d43db0f7836d3c4aa932

Patch Set 1 #

Patch Set 2 : migrating args.at<Object>() to args.at() #

Patch Set 3 : manual loop unrolling #

Patch Set 4 : call runtime for large strings #

Total comments: 16

Patch Set 5 : adding word per word checking #

Patch Set 6 : merge with master #

Patch Set 7 : fix messed up builtins.h #

Patch Set 8 : rebasing #

Patch Set 9 : call directly memchr for string byte search #

Patch Set 10 : add explicit memchr helper to avoid ambiguities due to overloading #

Patch Set 11 : add tests and missing IsHeapObject test #

Patch Set 12 : merging with master #

Patch Set 13 : fixing operatios for CSA verification #

Patch Set 14 : add fast unchecked runtime function #

Patch Set 15 : revert accidental changes #

Patch Set 16 : using separate CL for double conversion avoidance #

Patch Set 17 : merge with master #

Patch Set 18 : fix usigned compare #

Patch Set 19 : remove unused variable #

Patch Set 20 : merging with master #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1194 lines, -856 lines) Patch
M src/arguments.h View 1 chunk +2 lines, -1 line 0 comments Download
M src/assembler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +3 lines, -0 lines 0 comments Download
M src/assembler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +10 lines, -0 lines 0 comments Download
M src/builtins/builtins.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +666 lines, -666 lines 0 comments Download
M src/builtins/builtins-array.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -1 line 0 comments Download
M src/builtins/builtins-date.cc View 1 2 3 4 5 6 7 8 9 10 11 14 chunks +42 lines, -43 lines 0 comments Download
M src/builtins/builtins-function.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +4 lines, -6 lines 0 comments Download
M src/builtins/builtins-math.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M src/builtins/builtins-number.cc View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +5 lines, -5 lines 0 comments Download
M src/builtins/builtins-object.cc View 1 2 3 4 5 6 7 8 9 10 11 9 chunks +19 lines, -19 lines 0 comments Download
M src/builtins/builtins-promise.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -1 line 0 comments Download
M src/builtins/builtins-reflect.cc View 1 11 chunks +17 lines, -17 lines 0 comments Download
M src/builtins/builtins-string.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +167 lines, -9 lines 0 comments Download
M src/builtins/builtins-utils.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M src/code-stub-assembler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +3 lines, -0 lines 0 comments Download
M src/code-stub-assembler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +5 lines, -0 lines 0 comments Download
M src/compiler/code-assembler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +6 lines, -0 lines 0 comments Download
M src/compiler/code-assembler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +12 lines, -2 lines 0 comments Download
M src/compiler/raw-machine-assembler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +4 lines, -0 lines 0 comments Download
M src/compiler/raw-machine-assembler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +15 lines, -0 lines 0 comments Download
M src/elements.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M src/external-reference-table.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +2 lines, -0 lines 0 comments Download
M src/ic/ic.cc View 1 2 3 4 5 16 chunks +27 lines, -27 lines 0 comments Download
M src/machine-type.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +16 lines, -14 lines 0 comments Download
M src/objects.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -0 lines 0 comments Download
M src/runtime/runtime.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -0 lines 0 comments Download
M src/runtime/runtime-array.cc View 1 2 3 4 5 2 chunks +3 lines, -3 lines 0 comments Download
M src/runtime/runtime-compiler.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M src/runtime/runtime-function.cc View 1 2 3 4 5 6 12 13 14 15 16 17 18 19 1 chunk +1 line, -1 line 0 comments Download
M src/runtime/runtime-internal.cc View 1 2 3 4 5 1 chunk +3 lines, -3 lines 0 comments Download
M src/runtime/runtime-object.cc View 1 4 chunks +4 lines, -4 lines 0 comments Download
M src/runtime/runtime-proxy.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M src/runtime/runtime-regexp.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M src/runtime/runtime-simd.cc View 1 4 chunks +16 lines, -16 lines 0 comments Download
M src/runtime/runtime-strings.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +19 lines, -4 lines 0 comments Download
M src/runtime/runtime-utils.h View 1 2 chunks +5 lines, -5 lines 0 comments Download
M test/cctest/cctest.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +14 lines, -1 line 0 comments Download
M test/cctest/test-strings.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +35 lines, -0 lines 0 comments Download
M test/mjsunit/string-indexof-1.js View 1 2 3 4 5 6 7 8 9 10 1 chunk +57 lines, -0 lines 0 comments Download

Messages

Total messages: 78 (68 generated)
Camillo Bruni
PTAL first round. https://codereview.chromium.org/2539093002/diff/60001/src/builtins/builtins-string.cc File src/builtins/builtins-string.cc (right): https://codereview.chromium.org/2539093002/diff/60001/src/builtins/builtins-string.cc#newcode948 src/builtins/builtins-string.cc:948: GotoIf(IntPtrGreaterThan(string_length, IntPtrConstant(32)), &call_runtime); I tried unrolling ...
4 years ago (2016-12-05 16:32:33 UTC) #7
Jakob Kummerow
https://codereview.chromium.org/2539093002/diff/60001/src/builtins/builtins-string.cc File src/builtins/builtins-string.cc (right): https://codereview.chromium.org/2539093002/diff/60001/src/builtins/builtins-string.cc#newcode42 src/builtins/builtins-string.cc:42: void BranchIfSimpleOneByteStringInstanceType(Node* instance_type, high-level comment: using bit masks would ...
4 years ago (2016-12-06 06:58:40 UTC) #8
Camillo Bruni
PTAL "again" https://codereview.chromium.org/2539093002/diff/60001/src/builtins/builtins-string.cc File src/builtins/builtins-string.cc (right): https://codereview.chromium.org/2539093002/diff/60001/src/builtins/builtins-string.cc#newcode42 src/builtins/builtins-string.cc:42: void BranchIfSimpleOneByteStringInstanceType(Node* instance_type, On 2016/12/06 at 06:58:40, ...
4 years ago (2016-12-12 15:45:21 UTC) #30
Jakob Kummerow
lgtm
4 years ago (2016-12-13 02:18:05 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2539093002/380001
4 years ago (2016-12-16 11:32:24 UTC) #68
commit-bot: I haz the power
Try jobs failed on following builders: v8_presubmit on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_presubmit/builds/30784)
4 years ago (2016-12-16 11:36:14 UTC) #70
Camillo Bruni
jarin@ PTAL compiler/*
4 years ago (2016-12-16 12:11:19 UTC) #72
Jarin
lgtm for src/compiler/*
4 years ago (2016-12-16 12:28:06 UTC) #73
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2539093002/380001
4 years ago (2016-12-16 13:22:06 UTC) #75
commit-bot: I haz the power
4 years ago (2016-12-16 13:24:15 UTC) #78
Message was sent while issue was closed.
Committed patchset #20 (id:380001) as
https://chromium.googlesource.com/v8/v8/+/89f159b0420d643ecc78d43db0f7836d3c4...

Powered by Google App Engine
This is Rietveld 408576698