This document discusses efforts to improve the performance of JavaScript for web applications. It introduces ASM.JS, a subset of JavaScript that can be optimized to perform closer to native machine code by taking advantage of static typing. It also discusses Native Client (NaCl) and Portable Native Client (PNaCl), which allow C and C++ code to be run securely in the browser by compiling to an intermediate representation. Finally, it introduces WebAssembly as a new binary format for code that aims to be faster than JavaScript, have an AST-like structure, and support being run directly in the browser or through just-in-time compilation. The document argues that while JavaScript will still be important for web pages, it may no longer
48. LLVM IR
However,
Native Client Only Use A Subset of LLVM IR
C/C++,
Haskell etc. LLVM IR x86, ARM,
MIPS etc.
Platform neutral (In PNaCl)
49. NaCl
‣ Package prebuilt platform-dependent
binary images (one for each architecture).
‣ Only package LLVM bitcode, compile into
(platform-dependent) executable before
execution.
PNaCl
69. v8 support
‣ Run wasm(binary form) in v8!
https://github.com/v8/v8/tree/master/src/wasm
70. sexpr-wasm-prototype
‣ Turn (human readable) s-expression
To binary format wasm
‣ Use with v8
https://github.com/WebAssembly/sexpr-wasm-prototype
71. SUMMARY
▸ We still need static type to aid
performance
▸ Binary format would become the
future trends
▸ JS would work with other
solutions in parallel