by eloff · 4y ago · 0 comments
A real world example is esbuild, the author implemented it both Rust and Go initially. The Go version was faster and the code simpler. Which is why it's implemented in Go.
But why is swc faster than esbuild then? The code isn't even considerably more complex.
I'm saying the performance of Go can sometimes be surprisingly fast. Not that it's magic.
Don't write Rust as if it was Go. That doesn't say anything meaningful about either Go or Rust.
I'm not trying to say Go is faster than Rust, it's usually slower. But there are always exceptions to the rule. The Go code, on the other hand, is usually simpler and quicker to write. For that reason I'd prefer Go if the problem lends itself to a garbage collected language.
> This is a side project and it has to be fun for me to work on it.
I respect this 100% - but then we shouldn't assume Go is better than Rust just based on that esbuild used it instead of Rust.