IRC log of js2wasm on 2023-09-13

Timestamps are in UTC.

06:35:56 [RRSAgent]
RRSAgent has joined #js2wasm
06:36:00 [RRSAgent]
logging to https://www.w3.org/2023/09/13-js2wasm-irc
06:36:00 [tidoust]
RRSAgent, do not leave
06:36:04 [tidoust]
RRSAgent, make logs public
06:36:05 [tidoust]
Meeting: Accelerating the Web performance by compiling Javascript code to WASM
06:36:05 [tidoust]
Chair: Wei Ding, Shi Ling
06:36:06 [tidoust]
Agenda: https://docs.google.com/document/d/1skQFGhxvK9F-o9jIkQOAKUziuvPzUigGlRE6InwC3sQ/edit#heading=h.2zye3qyc2qk
06:36:09 [tidoust]
clear agenda
06:36:11 [tidoust]
agenda+ Pick a scribe
06:36:13 [tidoust]
agenda+ Reminders: code of conduct, health policies, recorded session policy
06:36:15 [tidoust]
agenda+ Goal of this session
06:36:19 [tidoust]
agenda+ Discussion
06:36:21 [tidoust]
agenda+ Next steps / where discussion continues
06:37:24 [Dingwei]
thank you @tidoust
06:37:31 [Dingwei]
q+
06:38:40 [Dingwei]
ack dingwei
07:08:35 [Dingwei]
Dingwei has joined #js2wasm
07:08:53 [Dingwei]
q?
07:11:16 [Roy]
Roy has joined #js2wasm
07:11:38 [Roy]
agenda?
07:14:01 [Roy]
RRSAgent, make minutes
07:14:02 [RRSAgent]
I have made the request to generate https://www.w3.org/2023/09/13-js2wasm-minutes.html Roy
07:20:14 [tidoust]
tidoust has joined #js2wasm
07:20:35 [xueyuan]
xueyuan has joined #js2wasm
07:24:10 [xueyuan]
zakim, agenda?
07:24:10 [Zakim]
I see 5 items remaining on the agenda:
07:24:10 [Zakim]
1. Pick a scribe [from tidoust]
07:24:10 [Zakim]
2. Reminders: code of conduct, health policies, recorded session policy [from tidoust]
07:24:10 [Zakim]
3. Goal of this session [from tidoust]
07:24:10 [Zakim]
4. Discussion [from tidoust]
07:24:10 [Zakim]
5. Next steps / where discussion continues [from tidoust]
07:24:10 [Roy]
Roy has joined #js2wasm
07:24:10 [Dingwei]
present+
07:25:46 [Roy]
present+
07:26:35 [Shi_Xiaohua_BeihangU]
present+
07:27:24 [martin_alvarez]
martin_alvarez has joined #js2wasm
07:28:24 [xfq_]
xfq_ has joined #js2wasm
07:28:35 [xfq]
xfq has joined #js2wasm
07:28:42 [xfq_]
scribe+ xfq
07:28:49 [xfq_]
scribe+ xfq_
07:29:15 [martin_alvarez]
present+
07:29:17 [xfq_]
rrsagent, make log public
07:29:23 [xfq_]
rrsagent, make minutes
07:29:24 [RRSAgent]
I have made the request to generate https://www.w3.org/2023/09/13-js2wasm-minutes.html xfq_
07:29:31 [xfq_]
present+
07:30:08 [Lei_Zhao]
Lei_Zhao has joined #js2wasm
07:30:08 [xfq_]
present+ xueyuan
07:31:10 [angel_]
angel_ has joined #js2wasm
07:31:10 [ChrisLorenzo]
ChrisLorenzo has joined #js2wasm
07:32:15 [ken]
ken has joined #js2wasm
07:32:15 [JaseW]
JaseW has joined #js2wasm
07:32:15 [xfq]
Dingwei: welcome
07:32:15 [jkup_]
jkup_ has joined #js2wasm
07:32:15 [Roy]
agenda?
07:32:49 [xfq]
... is there any objections to recording this session?
07:32:49 [xfq]
[silence]
07:32:49 [xfq]
Dingwei: we have 2 presentations
07:32:49 [xfq]
... and about 10 minutes Q&A
07:32:57 [lilin]
lilin has joined #js2wasm
07:33:03 [xfq]
... health rules: https://www.w3.org/2023/09/TPAC/health.html
07:33:52 [xfq]
... slides are in https://github.com/w3c/tpac2023-breakouts/issues/22#issuecomment-1717073937
07:33:52 [xfq]
... my colleague Ling Shi will present
07:34:03 [angel_]
present+
07:34:08 [xfq]
ling: thanks for joining us
07:34:18 [xfq]
... my topic is 'web for apps'
07:34:21 [shanhuaqi]
shanhuaqi has joined #js2wasm
07:34:36 [angel_]
present+ Roy, xiaoqian, fuqiao, Li Lin, MartinA, Huaqi Shan,
07:34:58 [xfq]
... when preparing this topic, I read the 7 Predictions For The Web
07:35:08 [xfq]
https://fagnerbrack.com/i-made-7-predictions-for-the-web-for-the-next-5-years-d750d93b1b5a
07:35:28 [xfq]
... James Bankoski : 85% of All Apps use some level of web tech
07:35:50 [xfq]
... Meituan is famous in China
07:35:57 [xiaoqian]
xiaoqian has joined #js2wasm
07:36:06 [xfq]
... the miniapp and native app versions have almost the same interface
07:36:24 [angel_]
Present+ Ding Wei, SHi Lin
07:36:29 [xfq]
... let's review the history of building apps using frameworks
07:36:32 [xiaoqian]
present+
07:36:57 [xfq]
... phonegap, cordorva etc.
07:37:32 [xfq]
... frameworks like react-native, weex, and hippy are system UI frameworks
07:37:50 [xfq]
... there are also self-rendering frameworks like Flutter
07:38:03 [xfq]
s/hippy/Hippy
07:38:25 [xfq]
ling: let's look at the web dev stack using the front-end perspective
07:38:53 [xfq]
... application framework can only use limited DOM APIs
07:39:19 [xfq]
... there's still no good optimization methods for application development
07:39:31 [xfq]
... WASM is better, but rarely used
07:39:48 [xfq]
... currently mainly used for compiled code like C++
07:40:16 [angel_]
Present+ Chunming
07:40:17 [xfq]
... JS continue to be the language for web dev
07:40:41 [angel_]
Present+ Zhao Lei
07:40:42 [chunming]
chunming has joined #js2wasm
07:40:44 [xfq]
... here's an ideal Web Application Development Model we would like to discuss
07:41:06 [xfq]
... even the system API calls are based on wasm
07:41:08 [angel_]
Present+ Xiaoshua Shi
07:41:29 [xfq]
... of course, there are still many problems we need to solve to achieve such a model
07:41:38 [xfq]
... some of them are already being discussed
07:42:05 [xfq]
... how to compile JS to wasm?
07:42:19 [xfq]
... there are still many problems that need to be studied and discussed
07:42:23 [chunming]
present+
07:42:29 [JaseW]
present+
07:42:32 [xfq]
Dingwei: we have the next speaker
07:42:39 [xfq]
... who will introduce the solution
07:42:42 [xfq]
... and present online
07:42:48 [xfq]
Shi_Xiaohua_BeihangU: thanks Dingwei
07:43:04 [xfq]
... I'm Shi_Xiaohua_BeihangU from Beihang University
07:43:25 [xfq]
... I'll present JWST—— A JavaScript-to- WebAssembly Static Translator
07:43:55 [xfq]
... we think that ait is useful to build a static compiler to compile from js to wasm
07:44:11 [christianliebel]
christianliebel has joined #js2wasm
07:44:24 [xfq]
[show code example]
07:44:44 [christianliebel]
present+
07:44:51 [xfq]
Shi_Xiaohua_BeihangU: the example is simple, some compilers can statically analyze the code
07:45:06 [xfq]
... in JS different types could be operating together
07:45:24 [xfq]
... no compilers can know each type and generate the appropriate type
07:45:44 [xfq]
[Demonstration of dynamic types]
07:45:49 [xfq]
[Demonstration of dynamic loading]
07:46:12 [xfq]
Shi_Xiaohua_BeihangU: for static compiler, the JS features of dynamic loading are key challenges
07:46:25 [xfq]
... now I would like to introduce JWST
07:46:45 [xfq]
... it is a static compiler for compiling JavaScript to WASM and native code
07:46:59 [xfq]
... it uses QuickJS bytecode as input, and outputs LLVM IR
07:47:15 [xfq]
... it got the similar pass rate as QuickJS for ECMA test262
07:47:29 [xfq]
... JWST is about 30% and 50% faster than node.js when running SunSpider
07:47:36 [xfq]
[show WASM Sample Code]
07:47:56 [xfq]
[WASM vs. Java Bytecode]
07:48:06 [xfq]
Shi_Xiaohua_BeihangU: wasm and Java bytecode are different
07:48:13 [xfq]
... Java bytecode is designed for expressing Java programs
07:48:24 [xfq]
... because they have almost the same semantic expression capability
07:48:31 [tomayac]
tomayac has joined #js2wasm
07:48:36 [tomayac]
present+
07:48:41 [xfq]
... WASM is designed for working with JavaScript
07:48:50 [xfq]
... For instance, WASM is not a dynamically typed language
07:48:56 [xfq]
... WASM does not have a GC, etc.
07:49:06 [xfq]
[Show JWST Compilation Process]
07:49:36 [xfq]
Shi_Xiaohua_BeihangU: all wasm code can be replaced with native code by the compiler
07:49:48 [xfq]
[Compilation process demonstration]
07:50:03 [xfq]
Shi_Xiaohua_BeihangU: on the left side it's JS code
07:50:12 [xfq]
... the right side is QuickJS Bytecode
07:50:40 [xfq]
... to solve the problem of dynamic types
07:50:52 [xfq]
... JWST reuses the JSValue data structure of QuickJS
07:51:23 [xfq]
... before each operation the type of the value must be determined
07:51:33 [xfq]
[Demonstration of Dynamic Type Compilation Process]
07:51:55 [xfq]
Shi_Xiaohua_BeihangU: here we demonstrate the dynamic type compilation process
07:52:47 [xfq]
... if we already know a and b are integers there's no need to generate any @@ at all
07:53:00 [xfq]
[Type Profiling: Type information fusion]
07:53:05 [Dingwei]
q?
07:53:10 [xfq]
[Type Profiling: Example]
07:53:49 [xfq]
Shi_Xiaohua_BeihangU: the type information is shown on the figure
07:54:38 [xfq]
[Mixed running mode of compiled code and QuickJS Interpreter]
07:54:38 [xfq]
[Speculative Optimizations of Type Fixing]
07:54:43 [xfq]
Shi_Xiaohua_BeihangU: here's a more complicated mechanics for type fixing
07:55:01 [xfq]
... determine whether the types are correct or not
07:55:29 [xfq]
[GC Support]
07:55:49 [xfq]
Shi_Xiaohua_BeihangU: the GC for QuickJS is used in JWST by default
07:55:54 [xfq]
[Exception Support]
07:56:10 [xfq]
Shi_Xiaohua_BeihangU: there is no exception table as we know in Java
07:56:28 [xfq]
... we don't use exception tables
07:56:36 [xfq]
[async/await Support]
07:56:58 [xfq]
Shi_Xiaohua_BeihangU: when the program is executed to await, the function foo() pauses the execution
07:57:03 [xfq]
... after the main function has been completed, the remaining code of the function foo() will be executed
07:57:12 [xfq]
[Asynchronous in mixed running mode]
07:57:18 [xfq]
[Typical Optimizations of JWST]
07:57:54 [xfq]
Shi_Xiaohua_BeihangU: type fixing has been introduced in the previous section
07:58:10 [xfq]
... and inline cache
07:58:27 [xfq]
[Inline Cache]
07:58:49 [xfq]
Shi_Xiaohua_BeihangU: managed JS runtimes like V8 implement optimization called inline cache
07:59:20 [xfq]
... it adds a cache area for object searching
07:59:25 [xfq]
[Array layout optimization]
07:59:51 [xfq]
[Global Function Caching]
08:00:05 [xfq]
Shi_Xiaohua_BeihangU: *Most* JS functions do not change their names after definitions
08:00:19 [xfq]
... the compiler resolves the definitions at compile time, so the generated code calls into the function directly without going through dispatch() or other wrappers
08:00:32 [xfq]
[Performance Evaluation of the compiler]
08:00:59 [xfq]
Shi_Xiaohua_BeihangU: the compiler has a consistent pass rate compared to QuickJS
08:01:04 [xfq]
... wrt test262
08:01:30 [xfq]
... in terms of built-ins, 204 test cases related to Atomic require multithreading support, while WASM runtime does not support multithreading currently
08:01:40 [xfq]
... 1 test cases related to floating-point precision
08:01:46 [xfq]
[Floating-Point Rounding modes]
08:02:22 [xfq]
Shi_Xiaohua_BeihangU: wasm only supports round-to-nearest
08:02:27 [xfq]
... unlike native
08:02:42 [xfq]
... we ran JWST on SunSpider
08:03:05 [xfq]
... its total performance is ~50% faster than Node.js, for the first execution
08:03:43 [xfq]
... the running time on Node.js include all the initialization
08:04:07 [xfq]
[Shi_Xiaohua_BeihangU introduces SunSpider@wasmer, Kirin 990E]
08:04:48 [xfq]
[SunSpider@wasmer, Intel i7]
08:05:14 [xfq]
[Show React Native Samples (TTI, 0.1x play)]
08:05:45 [xfq]
Shi_Xiaohua_BeihangU: the examples are V8 with cache and V8 without cache
08:06:17 [xfq]
... significantly faster than V8 without cache
08:07:02 [xfq]
[Comparing JWST (WASM), JWST Native, V8-Cache, and V8-No-Cache]
08:07:16 [xfq]
[Evaluate the Start-up JS Scripts of a RN APP]
08:07:44 [xfq]
Shi_Xiaohua_BeihangU: when we analyze the overhead on the startup screen
08:07:54 [Dingwei]
the presentation will end at 10:10 followed by Q/A
08:08:06 [xfq]
s/startup screen/startup script
08:08:37 [xfq]
s/startup script/startup script of a release-mode RN app
08:08:37 [Dingwei]
the q is open, please do q+ if you like to speak
08:08:39 [xfq]
... JWST-WASM is ~10.5x and ~126% faster than V8 without code cache and with code cache, respectively
08:09:00 [xfq]
[React Native Samples: Compilation Time and Code Size]
08:09:27 [xfq]
Shi_Xiaohua_BeihangU: the JS Release version is 1.3MB
08:09:56 [xfq]
... JWST (JSBundle => LLVM IR) compilation time is 640s
08:10:15 [xfq]
... on Intel Core i9-12900KF 3.20GHz with 32G Memory
08:10:24 [xfq]
[Expectations for WASM]
08:10:33 [xfq]
Shi_Xiaohua_BeihangU: 1. DLL Support
08:10:39 [xfq]
... 2. GC Support
08:10:45 [xfq]
... 3. DOM Support
08:10:50 [ReinaldoFerraz_]
ReinaldoFerraz_ has joined #js2wasm
08:10:56 [xfq]
... 4. Furthermore, is it possible to use WASM as the fundamental language/bytecode for web applications?
08:11:11 [xfq]
... that means running JavaScript and all other languages on WASM runtimes
08:11:22 [xfq]
Dingwei: thanks for sharing
08:11:43 [xfq]
... before going to the Q&A session, I want to reintroduce the goal of the session
08:11:51 [xfq]
... we would like to solicit comments
08:11:51 [tomayac]
q+
08:12:11 [xfq]
tomayac: thanks for the presentation
08:12:11 [xfq]
ack to
08:12:16 [Dingwei]
q?
08:12:44 [xfq]
tomayac: regarding the development experience, I was wondering if you have compared it to AssemblyScript
08:13:14 [tomayac]
How is the developer experience compared to AssemblyScript? https://www.assemblyscript.org/
08:13:16 [xiaoqian]
Shi_Xiaohua_BeihangU ^^
08:13:30 [Dingwei]
q?
08:13:34 [xfq]
... second question, where can we find out more?
08:13:36 [tomayac]
Where can we find out more? Is there a link to a repository?
08:13:47 [xfq]
... I tried searching for them, but didn't find any information
08:14:09 [shi_ling]
shi_ling has joined #js2wasm
08:14:10 [xfq]
Shi_Xiaohua_BeihangU: the challenge for a static compiler is bigger
08:14:25 [xfq]
... we will handle all the dynamic type features
08:14:39 [Dingwei]
q+
08:14:45 [xfq]
... for this part it is more difficult than AssemblyScript
08:14:53 [gaochun]
gaochun has joined #js2wasm
08:15:00 [xfq]
... we build this with Huawei
08:15:09 [xueyuan]
q?
08:15:13 [Dingwei]
q?
08:15:13 [xfq]
Dingwei: we will open source this
08:15:16 [xfq]
ack Dingwei
08:15:51 [xfq]
daniel: how is the point of view for a developer?
08:15:59 [Dingwei]
s/will open source this/ will consider to open source this and it is still in the process
08:16:18 [xfq]
... if something goes wrong and do some tracing, is that supported through the whole process?
08:16:24 [xfq]
ling: this is a good question
08:16:32 [xfq]
... we think debugging should be supported
08:16:41 [Dingwei]
q?
08:16:42 [xfq]
... this is an attempt to compiling JS to wasm
08:16:52 [tomayac]
q+ To ask if they have looked at WebAssembly Garbage Collection (WasmGC)
08:16:56 [xfq]
... there are a lot of problems need solving
08:17:06 [xfq]
... debugging is a problem that needs to be solved later
08:17:06 [Dingwei]
ack to
08:17:06 [Zakim]
tomayac, you wanted to ask if they have looked at WebAssembly Garbage Collection (WasmGC)
08:17:24 [xfq]
tomayac: Chrome just sent an intent to ship WebAssembly Garbage Collection (WasmGC)
08:17:35 [xfq]
... have you looked at it?
08:17:38 [Dingwei]
q?
08:17:58 [xfq]
Shi_Xiaohua_BeihangU: regarding GC, we just use the GC of QuickJS
08:18:13 [Dingwei]
q?
08:18:13 [xfq]
... if wasm runtime has GC, I think we will use it
08:18:43 [xfq]
Dingwei: any other questions?
08:18:52 [xfq]
... especially from the wasm WG
08:19:37 [dape]
dape has joined #Js2wasm
08:20:01 [xfq]
Dingwei: we will continue to discuss on github
08:20:11 [xfq]
... on this page: https://github.com/w3c/tpac2023-breakouts/issues/22
08:20:25 [xfq]
... we want to collect more thoughts and discuss together
08:20:42 [gaochun]
Is SIMD supported by JWST?
08:20:44 [Dingwei]
q?
08:21:11 [xfq]
Shi_Xiaohua_BeihangU: we have a compiler toolchain
08:21:35 [xfq]
... if LLVM compiler supportsSIMD, we will support SIMD
08:21:36 [Dingwei]
q?
08:21:42 [xfq]
s/supportsSIMD/supports SIMD
08:21:56 [xfq]
s/if LLVM/if the LLVM
08:22:40 [xfq]
Dingwei: any more questions?
08:23:11 [ChrisLorenzo]
present+
08:23:22 [xfq]
rrsagent, make minutes
08:23:24 [RRSAgent]
I have made the request to generate https://www.w3.org/2023/09/13-js2wasm-minutes.html xfq
08:23:31 [dape]
Present+
08:23:36 [gaochun]
present+
08:23:39 [xfq]
rrsagent, make minutes
08:23:41 [RRSAgent]
I have made the request to generate https://www.w3.org/2023/09/13-js2wasm-minutes.html xfq
08:23:59 [shanhuaqi]
present+
08:34:19 [xfq]
xfq has joined #js2wasm
08:38:09 [xfq]
xfq has joined #js2wasm
08:39:05 [Roy]
Roy has joined #js2wasm
08:45:30 [xueyuan]
present+ Daniel Peintner, Ken Komatsu, Thomas Steiner, Jiantong Zhou, Christian Liebel, Andrew Comminos, Sam Weiss
08:51:12 [xueyuan]
present+ participants on Zoom (Kirk Lin, Jianxin Zhang, Larry Zhao, yu luo, Huihai Shen, davey, Alexandru Mihai, Davor Davidovikj, ripple, Dbettkk)
08:51:19 [xueyuan]
rrsagent, make minutes
08:51:20 [RRSAgent]
I have made the request to generate https://www.w3.org/2023/09/13-js2wasm-minutes.html xueyuan
08:52:03 [xfq]
xfq has joined #js2wasm
08:53:08 [xueyuan]
present- participants on Zoom (Kirk Lin, Jianxin Zhang, Larry Zhao, yu luo, Huihai Shen, davey, Alexandru Mihai, Davor Davidovikj, ripple, Dbettkk)
08:53:13 [xueyuan]
rrsagent, make minutes
08:53:15 [RRSAgent]
I have made the request to generate https://www.w3.org/2023/09/13-js2wasm-minutes.html xueyuan
08:53:55 [xueyuan]
present+ participants on Zoom (Kirk Lin; Jianxin Zhang)
08:54:00 [xueyuan]
rrsagent, make minutes
08:54:02 [RRSAgent]
I have made the request to generate https://www.w3.org/2023/09/13-js2wasm-minutes.html xueyuan
08:54:54 [xueyuan]
present- participants on Zoom (Kirk Lin; Jianxin Zhang)
08:55:38 [xueyuan]
present+ participants on Zoom (Kirk Lin; Jianxin Zhang; Larry Zhao; yu luo; Huihai Shen; davey; Alexandru Mihai; Davor Davidovikj; ripple; Dbettkk)
08:55:43 [xueyuan]
rrsagent, make minutes
08:55:45 [RRSAgent]
I have made the request to generate https://www.w3.org/2023/09/13-js2wasm-minutes.html xueyuan
08:58:29 [xiaoqian]
xiaoqian has joined #js2wasm
09:01:00 [tidoust]
tidoust has joined #js2wasm
09:21:18 [sxh]
sxh has joined #js2wasm
10:13:20 [xiaoqian]
xiaoqian has joined #js2wasm
10:16:49 [xiaoqian]
xiaoqian has joined #js2wasm
10:19:47 [xfq]
xfq has joined #js2wasm
10:22:01 [Roy]
Roy has joined #js2wasm
10:22:44 [xueyuan]
xueyuan has joined #js2wasm
11:30:38 [Roy]
Roy has joined #js2wasm
11:59:45 [xfq]
xfq has joined #js2wasm
12:00:39 [Roy]
Roy has joined #js2wasm
12:05:13 [tidoust]
tidoust has joined #js2wasm