Bug 144985 - String.prototype.split() should create efficient substrings.
Summary: String.prototype.split() should create efficient substrings.
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: InRadar, Performance
Depends on:
Blocks:
 
Reported: 2015-05-13 20:18 PDT by Andreas Kling
Modified: 2015-05-14 12:08 PDT (History)
4 users (show)

See Also:


Attachments
Patch (7.43 KB, patch)
2015-05-13 20:21 PDT, Andreas Kling
ggaren: review+
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-13 20:18:13 PDT
<rdar://problem/20949344>

String.prototype.split() should create JSStrings using the lazy substring optimization.
Comment 1 Andreas Kling 2015-05-13 20:21:33 PDT
Created attachment 253088 [details]
Patch
Comment 2 Geoffrey Garen 2015-05-14 11:10:03 PDT
Comment on attachment 253088 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=253088&action=review

r=me

> Source/JavaScriptCore/runtime/StringPrototype.cpp:179
> +static inline JSString* jsSubstringWithSharing(ExecState* exec, JSValue originalValue, const String& string, unsigned offset, unsigned length)

I would just call this jsSubstring.
Comment 3 Andreas Kling 2015-05-14 12:08:56 PDT
Committed r184346: <http://trac.webkit.org/changeset/184346>