Bug 145351 - String.prototype.indexOf() should use StringView.
Summary: String.prototype.indexOf() should use StringView.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andreas Kling
URL:
Keywords: Performance
Depends on:
Blocks:
 
Reported: 2015-05-23 13:50 PDT by Andreas Kling
Modified: 2015-06-09 11:02 PDT (History)
4 users (show)

See Also:


Attachments
Patch (10.18 KB, patch)
2015-05-23 13:55 PDT, Andreas Kling
no flags Details | Formatted Diff | Diff
Patch (1.59 KB, patch)
2015-06-08 22:15 PDT, Andreas Kling
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Kling 2015-05-23 13:50:43 PDT
We can avoid creating new StringImpls in indexOf() if we use JSString::view() to search through the string.
This requires adding a StringView::find(StringView, start) implementation.
Comment 1 Andreas Kling 2015-05-23 13:55:32 PDT
Created attachment 253650 [details]
Patch
Comment 2 WebKit Commit Bot 2015-05-26 11:57:31 PDT
Comment on attachment 253650 [details]
Patch

Clearing flags on attachment: 253650

Committed r184867: <http://trac.webkit.org/changeset/184867>
Comment 3 WebKit Commit Bot 2015-05-26 11:57:36 PDT
All reviewed patches have been landed.  Closing bug.
Comment 4 Andreas Kling 2015-06-08 22:07:19 PDT
Re-opening to attach the StringPrototype parts, too. (Duh.)
Comment 5 Andreas Kling 2015-06-08 22:15:00 PDT
Created attachment 254547 [details]
Patch
Comment 6 WebKit Commit Bot 2015-06-09 11:02:17 PDT
Comment on attachment 254547 [details]
Patch

Clearing flags on attachment: 254547

Committed r185367: <http://trac.webkit.org/changeset/185367>
Comment 7 WebKit Commit Bot 2015-06-09 11:02:22 PDT
All reviewed patches have been landed.  Closing bug.