11934 shaares
326 private links
326 private links
- In Rust, this struct is 16 bytes (on x86_64, again) and in C, it is 24. This is because Rust is free to reorder the fields to optimize for size, while C is not.
- Social factor: it is more convenient to write a bite more dangerous code than in the equivalent C. Firefox failed two times to parallelize Firefox's style layout twice. They get it right the third time with Rust. Does a junior write faster production code in Rust than in C?
- Compile time vs runtime: Rust provides a bit of safety at runtime (index access)
If C is the fastest language, is there any inherent reason why Rust could not do the same things? At the fundamental level, the answer is “there’s no difference between the two.”
But projects does not work only on the fundamentals, "We’re usually talking about something in the context of engineering, a specific project, with specific developers, with specific time constraints, and so on. I think that there are so many variables that it is difficult to draw generalized conclusions."