Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yes, the same way is that Fortran is faster than C due to stricter aliasing rules.

But in practice C, Rust and Fortran are not really distinguishable on their own in larger projects. In larger projects things like data structures and libraries are going to dominate over slightly different compiler optimizations. This is usually Rust's `std` vs `libc` type stuff or whatever foundational libraries you pull in.

For most practical Rust, C, C++, Fortran and Zig have about the same performance. Then there is a notable jump to things like Go, C# and Java.



> In larger projects things like data structures and libraries are going to dominate over slightly different compiler optimizations.

At this level of abstraction you'll probably see on average an effect based on how easy it is to access/use better data structures and algorithms.

Both the ease of access to those (whether the language supports generics, how easy it is to use libraries/dependencies), and whether the population of algorithms and data structures available are up to date, or decades old, would have an impact.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: