Bug 38814 - Improve string indexing performance
Summary: Improve string indexing performance
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-09 02:05 PDT by Oliver Hunt
Modified: 2010-05-12 16:40 PDT (History)
1 user (show)

See Also:


Attachments
Patch (11.43 KB, patch)
2010-05-09 02:38 PDT, Oliver Hunt
no flags Details | Formatted Diff | Diff
Patch (11.56 KB, patch)
2010-05-09 02:42 PDT, Oliver Hunt
mjs: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Hunt 2010-05-09 02:05:42 PDT
Improve string indexing performance
Comment 1 Oliver Hunt 2010-05-09 02:38:51 PDT
Created attachment 55496 [details]
Patch
Comment 2 Oliver Hunt 2010-05-09 02:42:33 PDT
Created attachment 55497 [details]
Patch
Comment 3 Maciej Stachowiak 2010-05-09 03:14:49 PDT
Comment on attachment 55497 [details]
Patch

r=me
Comment 4 Oliver Hunt 2010-05-09 04:42:37 PDT
Committed r59056: <http://trac.webkit.org/changeset/59056>
Comment 5 Chao-ying Fu 2010-05-12 16:40:10 PDT
Hi,

  I think the code in JIT::stringGetByValStubGenerator() may contain redundant code.
Ex:
...
#if USE(JSVALUE64)
    jit.zeroExtend32ToPtr(regT1, regT1);
#else
    jit.emitFastArithImmToInt(regT1);
#endif
...

  The same code appears in "JIT::emit_op_get_by_val()".  So, we may execute one more time in stringGetByValStubGenerator().

  I need to comment out jit.emitFastArithImmToInt(regT1) for MIPS to fix two new regressions.  Otherwise, regT1 is shifted right by 1 bit (twice) and the index to a string is wrong.  Thanks a lot!

Ex:
# svn diff JITPropertyAccess.cpp
...
-#if USE(JSVALUE64)
-    jit.zeroExtend32ToPtr(regT1, regT1);
-#else
-    jit.emitFastArithImmToInt(regT1);
-#endif


Regards,
Chao-ying