Skip to content

asm.js & wasm

wangb edited this page Apr 25, 2018 · 1 revision

asm.js

  • subset of JavaScript, run in any js environment.
  • emscripten generate plain js txt.
  • only int and float type, operation on TypedArray for stucture data
  • no gc
  • need js engine optimize
  • aot

binary data in js: ArrayBuffer object is used to represent a generic, fixed-length raw binary data buffer. You cannot directly manipulate the contents of an ArrayBuffer; instead, you create one of the TypedArray objects or a DataView object which represents the buffer in a specific format, and use that to read and write the contents of the buffer. So ArrayBuffer is the underlying data of TypedArray. This is true for Buffer in nodejs.

wasm

  • standardization of asm.js
  • emscripten generate bytecode (binary format).
Clone this wiki locally