Bug 149310 - Optimize WebAssembly calls
Summary: Optimize WebAssembly calls
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-17 15:53 PDT by Sukolsak Sakshuwong
Modified: 2016-12-20 14:34 PST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sukolsak Sakshuwong 2015-09-17 15:53:11 PDT
Currently, when a WebAssembly function calls another function (JS or WASM), it will type check the return value and coerce it into the expected type. Similarly, when a WebAssembly function is called by another function (JS or WASM), it will type check the arguments and coerce them into the expected types. We can avoid this type checking and type coercion if we know that the caller or the callee is a WebAssembly function, because WebAssembly is statically typed.

We can probably take it further by avoiding boxing and unboxing of values completely when a WebAssembly function calls another WebAssembly function.
Comment 1 Sukolsak Sakshuwong 2015-09-17 15:56:55 PDT
See also: Geoff's comments https://bugs.webkit.org/show_bug.cgi?id=149033#c6