Remix.run Logo
▲ ModernMech an hour ago

Okay but if you don't use generics and monomorphization, then what explains it?

▲dralley 39 minutes ago | parent [-]

It's unlikely that many people are using Rust without using Option<T> or Result<T, U> a fair bit. Idiomatic Rust fundamentally uses a lot of generics. And a basic for loop expands into quite a lot of intermediate representation due to Iterator.

▲ModernMech 10 minutes ago | parent [-]

Other languages support generics, monomorphization, and iterators, but they're not as slow as Rust to compile, what's the reason for that?

▲moritzruth 2 minutes ago | parent [-]

AFAIK it's because of trait solving. And also not every language does monomorphization.