Bug 103989 - [V8] Replace String::New("symbol") with String::NewSymbol("symbol")
Summary: [V8] Replace String::New("symbol") with String::NewSymbol("symbol")
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kentaro Hara
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-04 02:57 PST by Kentaro Hara
Modified: 2012-12-04 16:29 PST (History)
3 users (show)

See Also:


Attachments
Patch (14.89 KB, patch)
2012-12-04 02:58 PST, Kentaro Hara
haraken: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kentaro Hara 2012-12-04 02:57:05 PST
In V8, a symbol lookup is faster than a string lookup. We should use String::NewSymbol("symbol") for symbols.
Comment 1 Kentaro Hara 2012-12-04 02:58:21 PST
Created attachment 177462 [details]
Patch
Comment 2 Kentaro Hara 2012-12-04 02:59:03 PST
If this patch looks OK, I'll do the rest of the replacements.
Comment 3 Adam Barth 2012-12-04 08:39:38 PST
Comment on attachment 177462 [details]
Patch

Ok.  The only downside might be that NewSymbol is slower to create.
Comment 4 Kentaro Hara 2012-12-04 16:28:46 PST
Committed r136589: <http://trac.webkit.org/changeset/136589>
Comment 5 Kentaro Hara 2012-12-04 16:29:34 PST
Comment on attachment 177462 [details]
Patch

Landed manually.