WebAssembly Articles
-
Shrinking WebAssembly and JavaScript code sizes in Emscripten
Emscripten is a compiler toolchain for asm.js and WebAssembly which lets you run C and C++ on the web at near-native speed. Emscripten output sizes have decreased a lot recently, especially for smaller programs. Alon Zakai takes a closer look at some of these optimizations and new areas for improvement.
-
Oxidizing Source Maps with Rust and WebAssembly
A detailed look at how we replaced the most performance-sensitive portions of the
source-map
JavaScript Library’s source map parser with Rust code that is compiled to WebAssembly. The results: The WebAssembly is up to 5.89 times faster than the JavaScript implementation on realistic benchmarks operating on real world source maps! Additionally, performance is also more consistent: relative standard deviations decreased. We hope that, by sharing our experience, we inspire others rewrite performance-sensitive JavaScript in Rust via WebAssembly. -
Making WebAssembly even faster: Firefox’s new streaming and tiering compiler
People call WebAssembly a game changer because it makes it possible to run code on the web faster. Some speedups are already present, and some are yet to come. With streaming compilation, the browser compiles the code while the code is still being downloaded. Up until now, this was just a potential future speedup. But with the release of Firefox 58 next week, it becomes a reality. Firefox 58 also includes a new 2-tiered compiler. The new baseline compiler compiles code 10–15 times faster than the optimizing compiler. Combined, these two changes mean we compile code faster than it comes in from the network.
-
Experimenting with WebAssembly and Computer Vision
This past summer, four students at a coding bootcamp in Los Angeles began experimenting with WebAssembly. The result, after six weeks of exploration, was WebSight: a real-time face detection demo based on OpenCV.
-
The Next Generation of Web Gaming
Now available in Firefox and Chrome, and also soon in Edge and WebKit, WebAssembly enables near-native performance of code in the browser, which is great for game development, and has also shown benefits for WebVR applications. Here's a look at how far we've come and what's ahead for HTML5 game development.
-
WebAssembly for Native Games on the Web
There's never been a better time to port a native game to the web. Here are some tips from the trenches for getting started with WebAssembly and Emscripten.
-
Creating a WebAssembly module instance with JavaScript
This is the 1st article in a 3-part series of articles with code cartoons that illustrate how to get started running WebAssembly modules in the browser today, how to work with memory in WebAssembly, and how to use table imports.
-
Memory in WebAssembly (and why it’s safer than you think)
This is the 2nd article in a 3-part series of articles with code cartoons about running WebAssembly modules and memory safety.
-
WebAssembly table imports… what are they?
This is the 3rd article in a 3-part series of articles with code cartoons that illustrate how to get started running WebAssembly modules and how to use table imports.
-
Why WebAssembly is Faster Than asm.js
Performance is tricky to measure, and has many aspects. Also, in a new technology there are always going to be not-yet-optimized cases. So not every single benchmark will be fast on WebAssembly today. This post describes why WebAssembly should be fast; where it isn’t yet, those are bugs we need to fix.