Bug 20227

Summary: Optimize [ "constant string" ] into an identifier access.
Product: WebKit Reporter: Gavin Barraclough <barraclough>
Component: JavaScriptCoreAssignee: Gavin Barraclough <barraclough>
Status: RESOLVED WONTFIX    
Severity: Normal CC: zwarich
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
the patch! (changes nodes.cpp)
none
Patch, -1.5% on sunspider :-( none

Description Gavin Barraclough 2008-07-30 08:25:27 PDT
Optimize bracket nodes where the subscript is a constant string to just emit an identifier access.

Will help code like the test case in:
https://bugs.webkit.org/show_bug.cgi?id=20209

(takes f2() from .61s to .46s on my MPB)

Should have no impact on sunspider, this case does not occur.

patch in 5... 4... 3...
Comment 1 Gavin Barraclough 2008-07-30 08:43:02 PDT
Created attachment 22553 [details]
the patch! (changes nodes.cpp)

oh, s/MPB/MBP/ in my last comment. :-)
Comment 2 Cameron Zwarich (cpst) 2008-08-01 16:09:18 PDT
Comment on attachment 22553 [details]
the patch! (changes nodes.cpp)

r=me

I would like a layout test, though.
Comment 3 Gavin Barraclough 2008-08-19 13:15:55 PDT
Created attachment 22880 [details]
Patch, -1.5% on sunspider :-(
Comment 4 Gavin Barraclough 2010-03-02 17:54:36 PST
Patch wildly out of date, and I don't know there to be a real world benefit here.  Closing for now, if we want to look at this again we can start from scratch.