Mozilla's engineers improved the performance of the Ion compiler backend in Firefox, addressing issues with excessive memory and CPU usage when running Microsoft's ONNX Runtime. Key optimizations included switching from sorted linked lists to optionally-sorted vectors for VirtualRegister live ranges, implementing the Semi-NCA algorithm for dominator tree building, using Sparse BitSets for better memory management, and optimizing move resolution functions. These changes resulted in significant performance gains, reducing compilation time from minutes to mere seconds. Future plans involve further refining the WebAssembly compilation pipeline for even better performance.

7m read timeFrom spidermonkey.dev
Post cover image
Table of contents
The problemOptimizing the Ion backendAdobe PhotoshopNew Wasm compilation pipeline

Sort: