Why compiling Rust to WebAssembly is slow
SMRTR summary
Compiling Rust to WebAssembly with debug info enabled can be 40x slower due to a quadratic bug in LLVM's Register Stackify pass. The pass rescans growing lists of DBG_VALUE records inefficiently, turning 23 seconds into 31 minutes for some crates. A proposed three-part patch eliminates the quadratic blowup, dropping ed25519-compact's codegen from 1,684 seconds to 23 seconds — and the existing LLVM fix barely helps.
SMRTR provides this summary for quick context. The original article belongs to lobste.rs.
Read the original article