3 ms·
That’s the same question as why JS is consistently much slower than Rust. They are not at all similar languages, there is absolutely zero reason to expect other
by kaba0 3y ago
That’s the same question as why JS is consistently much slower than Rust. They are not at all similar languages, there is absolutely zero reason to expect otherwise. Go is a managed language with a GC that will slow down threads at high allocation rates and have GC pause times. Also, the default compiler just spews out machine code with barely any optimization (hence the fast compile times).
Note: this doesn’t mean tracing GCs are slow, they are in fact faster than RC. But Rust just simply has more control over what actually happens, than a managed language.