|
|
Created:
4 years, 1 month ago by petermarshall Modified:
4 years, 1 month ago Reviewers:
Yang CC:
v8-reviews_googlegroups.com Target Ref:
refs/pending/heads/master Project:
v8 Visibility:
Public. |
Description[builtins] Improve StringPrototypeEndsWith performance by adding a fastpath.
If the strings are both onebyte strings, then use memcmp on the underlying data stores.
BUG=chromium:657747
Committed: https://crrev.com/ee50747e1398657103b64d2394df3414502a8081
Cr-Commit-Position: refs/heads/master@{#41033}
Patch Set 1 #Patch Set 2 : Disallow heap alloc before flatcontent #
Total comments: 2
Patch Set 3 : Return false when strncmp fails #Patch Set 4 : Use memcmp instead to avoid casting #Messages
Total messages: 24 (17 generated)
petermarshall@chromium.org changed reviewers: + yangguo@chromium.org
PTAL :)
The CQ bit was checked by petermarshall@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...
Description was changed from ========== [builtins] Improve StringPrototypeEndsWith performance by adding a fastpath. BUG=chromium:657747 ========== to ========== [builtins] Improve StringPrototypeEndsWith performance by adding a fastpath. If the strings are both onebyte strings, then use strncmp on the underlying data stores. BUG=chromium:657747 ==========
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: v8_linux_dbg_ng on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_dbg_ng/builds/16324) v8_linux_dbg_ng_triggered on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_dbg_ng_triggered/b...) v8_mac_rel_ng on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_mac_rel_ng/builds/12610) v8_mac_rel_ng_triggered on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_mac_rel_ng_triggered/bui...)
The CQ bit was checked by petermarshall@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/2502323002/diff/20001/src/builtins/builtins-s... File src/builtins/builtins-string.cc (right): https://codereview.chromium.org/2502323002/diff/20001/src/builtins/builtins-s... src/builtins/builtins-string.cc:777: return *isolate->factory()->true_value(); isolate->heap()->true_value() also, why don't we return false_value if the compare fails? As in return isolate->heap()->ToBoolean(strncmp(...) == 0)
Do you think the pointer casting is too nasty... Not sure of another way to do it. https://codereview.chromium.org/2502323002/diff/20001/src/builtins/builtins-s... File src/builtins/builtins-string.cc (right): https://codereview.chromium.org/2502323002/diff/20001/src/builtins/builtins-s... src/builtins/builtins-string.cc:777: return *isolate->factory()->true_value(); On 2016/11/16 at 12:13:24, Yang wrote: > isolate->heap()->true_value() > > also, why don't we return false_value if the compare fails? As in > > return isolate->heap()->ToBoolean(strncmp(...) == 0) Oops, yep.
The CQ bit was checked by petermarshall@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...
The CQ bit was checked by petermarshall@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...
Description was changed from ========== [builtins] Improve StringPrototypeEndsWith performance by adding a fastpath. If the strings are both onebyte strings, then use strncmp on the underlying data stores. BUG=chromium:657747 ========== to ========== [builtins] Improve StringPrototypeEndsWith performance by adding a fastpath. If the strings are both onebyte strings, then use memcmp on the underlying data stores. BUG=chromium:657747 ==========
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
On 2016/11/16 12:19:15, petermarshall wrote: > Do you think the pointer casting is too nasty... Not sure of another way to do > it. > > https://codereview.chromium.org/2502323002/diff/20001/src/builtins/builtins-s... > File src/builtins/builtins-string.cc (right): > > https://codereview.chromium.org/2502323002/diff/20001/src/builtins/builtins-s... > src/builtins/builtins-string.cc:777: return *isolate->factory()->true_value(); > On 2016/11/16 at 12:13:24, Yang wrote: > > isolate->heap()->true_value() > > > > also, why don't we return false_value if the compare fails? As in > > > > return isolate->heap()->ToBoolean(strncmp(...) == 0) > > Oops, yep. lgtm.
The CQ bit was checked by petermarshall@chromium.org
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.
Committed patchset #4 (id:60001)
Message was sent while issue was closed.
Description was changed from ========== [builtins] Improve StringPrototypeEndsWith performance by adding a fastpath. If the strings are both onebyte strings, then use memcmp on the underlying data stores. BUG=chromium:657747 ========== to ========== [builtins] Improve StringPrototypeEndsWith performance by adding a fastpath. If the strings are both onebyte strings, then use memcmp on the underlying data stores. BUG=chromium:657747 Committed: https://crrev.com/ee50747e1398657103b64d2394df3414502a8081 Cr-Commit-Position: refs/heads/master@{#41033} ==========
Message was sent while issue was closed.
Patchset 4 (id:??) landed as https://crrev.com/ee50747e1398657103b64d2394df3414502a8081 Cr-Commit-Position: refs/heads/master@{#41033} |