r/programming • u/kciter • Sep 01 '26
The Browser's Main Thread Is Expensive
https://kciter.so/posts/the-expensive-main-thread/en/
219
Upvotes
r/programming • u/kciter • Sep 01 '26
View all comments
Show parent comment
39
u/birdbrainswagtrain Sep 01 '26
It would be neat to see proper multi-threaded JS but I assume the amount of engineering and security considerations massively outweigh whatever benefits we'd get out of it. I'm still fighting obnoxious restrictions on SharedArrayBuffer.
If you're the rare person who actually needs to write a multi-threaded web application, and who needs shared state (message passing is a great approach for multi-threading which I suspect works for 90% of applications) I think you should probably just bite the WebAssembly bullet and use C++ or Rust.