3 ms·
Rust uses LLVM, which is a backend developed with C and C++ in mind that has been under development for a bit over a decade now. As long as you basically preten
by kibwen 10y ago
Rust uses LLVM, which is a backend developed with C and C++ in mind that has been under development for a bit over a decade now. As long as you basically pretend to be C++ at a low level (which Rust does), then the two remaining factors to consider are optimizations that happen in the front end and language-level semantics that enable language-dependent optimizations. (We should also consider that LLVM isn't as venerable as GCC, but it seems that (for C and C++ code) there's no longer any clearly superior choice between the two wrt general-purpose code generation (would be happy to hear arguments to the contrary)).