WebAssembly Tutorial (WebAssembly vs JavaScript)

In this video I show the process of setting up AssemblyScript to WebAssembly compilation and how to test and evaluate the performance of placing computation in WASM compared to just using Javascript. AssemblyScript has the goal to provide TypeScript like syntax as much as possible and is therefore suitable for those that prefer to write Javascript and TS over alternatives like C, C , Python, Go, Rust, Java, PHP, and so on. The functions covered in the video is a simple Add function, Factorials and Squaring all elements in an array. I also try to investigate the impact of passing large parameter payloads between JS and WASM and the glue code needed when passing more complex datatypes as parameters. Enjoy! :D Full Code: Setup from scratch steps: npm init -y npm install --save @assemblyscript/loader npm install --save-dev assemblyscript npx asinit . npm run asbuild Twitter: Github: h
Back to Top