|
|
Created:
4 years, 2 months ago by jgruber Modified:
4 years, 2 months ago Reviewers:
Yang CC:
v8-reviews_googlegroups.com, Benedikt Meurer Target Ref:
refs/pending/heads/master Project:
v8 Visibility:
Public. |
Description[regexp] Port split
This CL ports RegExp.prototype[@@split] to C++. Performance
regressions are expected due to:
* Slow RegExpImpl::Exec implementation instead of RegExpExec
stub. We should be able to improve this by straight-lining
RegExpImpl::Exec.
* Slow Factory::NewSubString instead of SubStringStub.
* Slow elements access to lastMatchInfo.
These points will be addressed in a follow-up CL.
BUG=v8:5339
Committed: https://crrev.com/05a55992340593e406fe79df1f26a4a503f06c87
Cr-Commit-Position: refs/heads/master@{#40161}
Patch Set 1 #
Total comments: 2
Patch Set 2 : Address comments #
Created: 4 years, 2 months ago
Depends on Patchset: Messages
Total messages: 21 (14 generated)
The CQ bit was checked by jgruber@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
jgruber@chromium.org changed reviewers: + yangguo@chromium.org
This, unfortunately, is where we start hurting octane/regexp. Before: Mean: 4850.2 +- 382.451 After : Mean: 4612 +- 351.277 The most obvious reasons are: * Slow RegExpImpl::Exec implementation instead of RegExpExec stub. We should be able to improve this by straight-lining RegExpImpl::Exec. * Slow Factory::NewSubString instead of SubStringStub. * Slow elements access to lastMatchInfo. I'm planning on converting lastMatchInfo to a simple FixedArray once all of regexp.js has been ported. So there's still quite a bit of work to do here in order to reach pre-port levels (and I doubt we will ever reach them if we stick with C++ only). But it probably makes sense to land so we can do follow-up cleanups. WDYT?
On 2016/10/06 14:31:42, jgruber wrote: > This, unfortunately, is where we start hurting octane/regexp. > > Before: Mean: 4850.2 +- 382.451 > After : Mean: 4612 +- 351.277 > > The most obvious reasons are: > * Slow RegExpImpl::Exec implementation instead of RegExpExec stub. We should be > able to improve this by straight-lining RegExpImpl::Exec. > * Slow Factory::NewSubString instead of SubStringStub. > * Slow elements access to lastMatchInfo. I'm planning on converting > lastMatchInfo to a simple FixedArray once all of regexp.js has been ported. > > So there's still quite a bit of work to do here in order to reach pre-port > levels (and I doubt we will ever reach them if we stick with C++ only). But it > probably makes sense to land so we can do follow-up cleanups. > > WDYT? The good news is that we recover most of what we lose here with the upcoming RegExp.prototype.replace fast-path.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
LGTM. Using a simple FixedArray for LastMatchInfo is definitely a good idea. https://codereview.chromium.org/2401643002/diff/1/src/builtins/builtins-regex... File src/builtins/builtins-regexp.cc (right): https://codereview.chromium.org/2401643002/diff/1/src/builtins/builtins-regex... src/builtins/builtins-regexp.cc:1389: out: Not a fan of goto... I suggest simply duplicating that code after the out-label at the goto site. Same below. Then again I don't feel too strongly about this.
The CQ bit was checked by jgruber@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
https://codereview.chromium.org/2401643002/diff/1/src/builtins/builtins-regex... File src/builtins/builtins-regexp.cc (right): https://codereview.chromium.org/2401643002/diff/1/src/builtins/builtins-regex... src/builtins/builtins-regexp.cc:1389: out: On 2016/10/07 13:37:23, Yang wrote: > Not a fan of goto... > > I suggest simply duplicating that code after the out-label at the goto site. > Same below. > > Then again I don't feel too strongly about this. Personally, I don't mind this goto pattern - I think it can be more readable than other alternatives in many cases. In this case, it also worked nicely to just extract the code to shrink a fixed array and create a JSArray into a function. :) Done.
Description was changed from ========== [regexp] Port split BUG=v8:5339 ========== to ========== [regexp] Port split This CL ports RegExp.prototype[@@split] to C++. Performance regressions are expected due to: * Slow RegExpImpl::Exec implementation instead of RegExpExec stub. We should be able to improve this by straight-lining RegExpImpl::Exec. * Slow Factory::NewSubString instead of SubStringStub. * Slow elements access to lastMatchInfo. These points will be addressed in a follow-up CL. BUG=v8:5339 ==========
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by jgruber@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from yangguo@chromium.org Link to the patchset: https://codereview.chromium.org/2401643002/#ps20001 (title: "Address comments")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== [regexp] Port split This CL ports RegExp.prototype[@@split] to C++. Performance regressions are expected due to: * Slow RegExpImpl::Exec implementation instead of RegExpExec stub. We should be able to improve this by straight-lining RegExpImpl::Exec. * Slow Factory::NewSubString instead of SubStringStub. * Slow elements access to lastMatchInfo. These points will be addressed in a follow-up CL. BUG=v8:5339 ========== to ========== [regexp] Port split This CL ports RegExp.prototype[@@split] to C++. Performance regressions are expected due to: * Slow RegExpImpl::Exec implementation instead of RegExpExec stub. We should be able to improve this by straight-lining RegExpImpl::Exec. * Slow Factory::NewSubString instead of SubStringStub. * Slow elements access to lastMatchInfo. These points will be addressed in a follow-up CL. BUG=v8:5339 ==========
Message was sent while issue was closed.
Committed patchset #2 (id:20001)
Message was sent while issue was closed.
Description was changed from ========== [regexp] Port split This CL ports RegExp.prototype[@@split] to C++. Performance regressions are expected due to: * Slow RegExpImpl::Exec implementation instead of RegExpExec stub. We should be able to improve this by straight-lining RegExpImpl::Exec. * Slow Factory::NewSubString instead of SubStringStub. * Slow elements access to lastMatchInfo. These points will be addressed in a follow-up CL. BUG=v8:5339 ========== to ========== [regexp] Port split This CL ports RegExp.prototype[@@split] to C++. Performance regressions are expected due to: * Slow RegExpImpl::Exec implementation instead of RegExpExec stub. We should be able to improve this by straight-lining RegExpImpl::Exec. * Slow Factory::NewSubString instead of SubStringStub. * Slow elements access to lastMatchInfo. These points will be addressed in a follow-up CL. BUG=v8:5339 Committed: https://crrev.com/05a55992340593e406fe79df1f26a4a503f06c87 Cr-Commit-Position: refs/heads/master@{#40161} ==========
Message was sent while issue was closed.
Patchset 2 (id:??) landed as https://crrev.com/05a55992340593e406fe79df1f26a4a503f06c87 Cr-Commit-Position: refs/heads/master@{#40161} |