Saying Goodbye to Asm.js

Hacker News Top News

Summary

Mozilla's SpiderMonkey engine disables asm.js optimizations by default, marking the end of the technology that paved the way for WebAssembly. Users are encouraged to recompile to WebAssembly for better performance.

No content available
Original Article
View Cached Full Text

Cached at: 05/20/26, 02:27 PM

# Saying goodbye to asm.js Source: [https://spidermonkey.dev/blog/2026/05/20/saying-goodbye-to-asmjs.html](https://spidermonkey.dev/blog/2026/05/20/saying-goodbye-to-asmjs.html) > Axe\-time, sword\-time, shields are sundered, Wind\-time, wolf\-time, ere the world falls\. –[*Völuspá*, Poetic Edda](https://sacred-texts.com/neu/poe/poe03.htm) As of[Firefox 148](https://www.firefox.com/en-US/firefox/148.0/releasenotes/), SpiderMonkey’s[asm\.js](http://asmjs.org/)optimizations are disabled by default, and we plan to remove the code entirely in a future release\. If you maintain a site that uses asm\.js, nothing will break\. asm\.js is just a subset of plain JavaScript, so the code keeps running through our regular JIT just like any other script\. That said, recompiling to WebAssembly will get you faster execution and smaller binaries\. ## History [asm\.js](http://asmjs.org/)was Mozilla’s response to the question posed by[NaCl and PNaCl](https://en.wikipedia.org/wiki/Google_Native_Client): how can the web run code at native speeds? The idea was clever: pick a strict, statically\-typed subset of JavaScript that an engine could recognize on the fly and compile down to native code\. We could get performance similar to NaCl/PNaCl and still have code live inside web content and use web API’s \(no separate sandbox, IPC, or[alternative API’s](https://en.wikipedia.org/wiki/NPAPI#PPAPI)\)\. asm\.js shipped in[Firefox 22](https://blog.mozilla.org/mbest/2013/06/25/asm-js-its-really-fast-backwards-compatible-and-now-in-the-release-version-of-firefox/)back in 2013 and was a success\. It let projects like Unity and Unreal ship C/C\+\+ codebases to the web for the first time, using just standard web technologies\. The[Epic Citadel demo](https://blog.mozilla.org/futurereleases/2013/05/02/epic-citadel-demo-shows-the-power-of-the-web-as-a-platform-for-gaming/)was ported to the web in just four days\. It was a landmark achievement, and a fond memory for the original asm\.js team\. asm\.js proved that we could run code at near\-native speed on the web using just web technologies\. This opened the door to[WebAssembly](https://webassembly.org/), which shipped several years later in[Firefox 52](https://www.firefox.com/en-US/firefox/52.0/releasenotes/)\. Without asm\.js,[we likely wouldn’t have WebAssembly](https://robert.ocallahan.org/2017/06/webassembly-mozilla-won.html)\. ## Why now? So why turn it off? WebAssembly has succeeded, and asm\.js usage has mostly migrated over\. Keeping the asm\.js path alongside WebAssembly costs us maintenance time and gives us extra attack surface in the VM\. If you are shipping asm\.js content, please consider recompiling to WebAssembly\! Our WebAssembly pipeline is significantly more advanced than the asm\.js one ever was\. You should see faster execution and smaller binaries\. ## Ragnarök ![OdinMonkey, by John Howard](https://spidermonkey.dev/assets/img/odin.jpg)![BaldrMonkey](https://spidermonkey.dev/assets/img/baldr.jpg) The asm\.js compiler is called OdinMonkey\. As was foretold long ago, OdinMonkey must meet his fated doom\. The bug[Ragnarök](https://bugzilla.mozilla.org/show_bug.cgi?id=ragnarok)tracks the “Twilight of OdinMonkey”\. All is not lost however, for born of OdinMonkey is BaldrMonkey, our WebAssembly optimizing compiler\. OdinMonkey may be swallowed whole by the wolf, Fenrir, but BaldrMonkey will rule over the reborn world alongside RabaldrMonkey \([“commotion”](https://en.wiktionary.org/wiki/rabalder)\), our WebAssembly baseline compiler\. On this Odin’s day \(Wednesday\) we thank OdinMonkey for thirteen years of service\. Skål\! > Then fields unsowed bear ripened fruit, all ills grow better, and Baldr comes back; Baldr and Hoth dwell in Hropt’s battle\-hall\. –[*Völuspá*, Poetic Edda](https://sacred-texts.com/neu/poe/poe03.htm)

Similar Articles

Show HN: Firefox in WebAssembly

Hacker News Top

Firefox is compiled to run in WebAssembly, using WebGL-based rendering and an experimental JS-to-WASM JIT, with web content proxied through a Puter-hosted Wisp server.

Soon We Can Finally Banish JavaScript to the ShadowRealm

Lobsters Hottest

The article discusses the TC39 ShadowRealm proposal, which aims to allow JavaScript execution in isolated environments (realms) without using iframes or web workers, improving code sandboxing and performance.

Firefox in WebAssembly

Simon Willison's Blog

Puter compiled Firefox to WebAssembly, enabling it to run inside another browser via a WebSocket proxy using the Wisp protocol. The demo, estimated to cost $25,000 in AI tokens, features end-to-end encryption and a public repository.

Performance of WebAssembly runtimes in 2026

Lobsters Hottest

This article benchmarks the performance of various WebAssembly runtimes (WAVM, WasmEdge, WAMR, wasm2c, Wasmer, Wasmtime, Wazero, Node, Bun) using the libsodium crypto library, comparing versions from 2024, 2025, and 2026. Results show that WAVM, WasmEdge (with AOT), WAMR (AOT), wasm2c, Wasmer, and Wasmtime achieve near-native performance for CPU-bound crypto, while wide_arithmetic instructions benefit crypto code.