Bug 189401

Summary: [WebAssembly] Optimize JS to Wasm call by using pointer of Signature as SignatureIndex
Product: WebKit Reporter: Yusuke Suzuki <ysuzuki>
Component: New BugsAssignee: Yusuke Suzuki <ysuzuki>
Status: RESOLVED FIXED    
Severity: Normal CC: ews-watchlist, keith_miller, mark.lam, msaboff, saam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch mark.lam: review+

Description Yusuke Suzuki 2018-09-07 02:42:45 PDT
[WebAssembly] Optimize JS to Wasm call by using pointer of Signature as SignatureIndex
Comment 1 Yusuke Suzuki 2018-09-07 02:52:02 PDT
Created attachment 349131 [details]
Patch
Comment 2 Yusuke Suzuki 2018-09-07 03:11:30 PDT
Created attachment 349134 [details]
Patch
Comment 3 Yusuke Suzuki 2018-09-07 05:17:05 PDT
Created attachment 349136 [details]
Patch
Comment 4 Yusuke Suzuki 2018-09-07 05:29:40 PDT
Created attachment 349137 [details]
Patch
Comment 5 Yusuke Suzuki 2018-09-07 05:34:42 PDT
Created attachment 349138 [details]
Patch
Comment 6 Yusuke Suzuki 2018-09-07 05:35:27 PDT
Created attachment 349139 [details]
Patch
Comment 7 Yusuke Suzuki 2018-09-07 05:53:28 PDT
Created attachment 349140 [details]
Patch
Comment 8 Yusuke Suzuki 2018-09-07 06:41:29 PDT
Created attachment 349143 [details]
Patch
Comment 9 Mark Lam 2018-09-07 10:19:31 PDT
Comment on attachment 349143 [details]
Patch

r=me.  I think you should remove Signature::firstValidIndex since it is no longer used.
Comment 10 Yusuke Suzuki 2018-09-07 10:23:01 PDT
(In reply to Mark Lam from comment #9)
> Comment on attachment 349143 [details]
> Patch
> 
> r=me.  I think you should remove Signature::firstValidIndex since it is no
> longer used.

Right! Thanks. Fixed.
Comment 11 Yusuke Suzuki 2018-09-07 10:29:09 PDT
Committed r235786: <https://trac.webkit.org/changeset/235786>
Comment 12 Radar WebKit Bug Importer 2018-09-07 10:30:44 PDT
<rdar://problem/44228602>
Comment 13 Saam Barati 2018-09-13 14:12:47 PDT
Comment on attachment 349143 [details]
Patch

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

Nice change.

The only thing that's weird to me is that we're still calling it an index. We should revise the name since the old name indicated an implementation style. But we're no longer using it as an index. Maybe we could call it something like UniqueSignature.

> Source/JavaScriptCore/ChangeLog:20
> +        This change significantly optimizes JS to wasm calls (1e7 times) from 600ms to 320ms.

Our wasm entry is so slow :(