Remix.run Logo
steveklabnik 3 days ago

The borrow checker is never a significant portion of compile times.

mattwilsonn888 3 days ago | parent [-]

This is incredibly misleading (technically true maybe) and you know it. Rust has slower compile times for the sake of safety, it's a tradeoff you shouldn't be ashamed of.

I didn't narrowly claim the borrow checker (as opposed to the type system or other static analysis) was the sole focus of the tradeoff.

shakow 3 days ago | parent [-]

> Rust has slower compile times

That's true.

> for the sake of safety,

That's false though. All deep dives in the topic find that the core issue is the sheer amount of unoptimized IR that is thrown at LLVM, especially due to the pervasive monomorphization of everything.

mattwilsonn888 3 days ago | parent [-]

Well it is arguably Rust's worst issue and it has remained it for most of its life.

Are you really going to try and convince people that this is completely incidental and not a result of pursuing its robust static contracts? How pedantic should we about about it?

burntsushi 2 days ago | parent | next [-]

On the one hand, you talk about being upfront and honest about trade-offs. On the other, you yourself are being less that credible by phrasing wild speculation as if they are facts.

So... do I as I say, not as I do?

steveklabnik 3 days ago | parent | prev | next [-]

Yes. This is borne out by the numbers. It has nothing to do with being pedantic, it’s basic facts.

purplesyringa 3 days ago | parent | prev | next [-]

It's not about static contracts at all, it's about keeping performance of high-level APIs high. It's all just about templates and generics, as far as I'm aware -- the same problem that plagues C++, except that it's worse in Rust because it's more ergonomic to expose templates in public library APIs in Rust than C++. Well, and also the trait solver might be quite slow, but again, it has nothing to do with memory safety.

shakow 3 days ago | parent | prev [-]

> Are you really going to try and convince people that this is completely incidental and not a result of pursuing its robust static contracts?

I am, because that's what all the people that explored the question converged on.

Now if you have other evidences to bring to the debate, feel free to – otherwise, please stop spreading FUD and/or incompetence.