Mojo is much faster than Rust, but slower than Go. I don't have much experience with Zig.
Mojo is designed to be very fast to compile, so many decisions were made to keep the core language simple, one example is in `where` clause, the checking there happens entirely in the parser. It can be stupid in situations where other languages are smart, and make you explicitly do checks that could be inferred in other languages. But on the other hand, it can be very fast since it doesn't have to do all the complicated resolving.
Another reason is how LLVM is used, Modular found ways to parralize LLVM code generation by introducing novel techniques that'll likely become a lot more popular with other languages.
I think they had a good dive here
https://www.youtube.com/watch?v=SEwTjZvy8vw
The gist is that MLIR (unlike LLVM) was designed to be multithreaded so the whole stack above LLVM IR is parallel, and then LLVM is used as a per-function codegen tool in parallel, so although LLVM itself is single threaded there are multiple seperate contexts of it. also I think they wrote their own linker.
Well, LLVM itself is still single-threaded; they just designed Mojo's compiler in such a way that the code generation part can be parallelised, which is something you can do if you understand LLVM from top to bottom. As far as I can see, no other production-grade LLVM consumer has been able to make it parallel; the single-threaded nature remains a major performance bottleneck.
> Modular found ways to parralize LLVM code generation by introducing novel techniques
> The novelty is in parrelizing LLVM, which is traditionally a single-thread code generator.
You said they parallelized LLVM with novel techniques, but then claimed the novelty is the very act of parallelizing it. That's circular, you still haven't explained what are the novel techniques?
Here is a presentation talking about the parallelization techniques, I skipped to the relevant part but the entire presentation is helpful in understanding how Mojo's compiler works: https://youtu.be/yuSBEXkjfEA?t=813&si=MlB7IsBDsj3o-PTX
From experience, Zig compile times are at least as fast as Go for debug builds that don't need to do linking with C libraries, etc. It does have to use LLVM for release builds however which is a lot slower.
Mojo compiles with O2 by default, it is similar to Go here. Release build is the default, debug is something you opt into. It is still very fast nonetheless