JS profiling seems to have come a long way. Might be worth another look. (Alternatively, Rust + wasm-pack let you ship Rust code to modern browsers.)

/