Yea, it does require great discipline but I've been surprised by the lack of tools to help with writing high performance js.
Surely there can be some middle ground were you just want some small part of your app to run faster without including another tech ecosystem (locked within a Wasm sandbox).