Re:Rolldown: Rollup compatible bundler written in Rust
by Tade0 on Friday March 08, 2024 @03:04PM
(#39645678)
My experience is that the main reason why Rust is faster than JS in some applications is that the latter tends to do a lot of copying and other memory-intensive tasks - especially those related to running the JS virtual machine.
If you can reduce the problem to a series of operations on pre-allocated typed arrays, JS is fast enough.
Unfortunately in the case of Rollup that would be hard to do.
1) I know Rust, not Go (esbuild is written in go-lang)
2) I don't have to worry as much about breaking Rollup, and I'm not nearly as confident in my ability to write performant JS as I am in writing performant Rust.