News for hackers. Stuff that matters.
Re:Fortran by hedora on Monday August 28, 2023 @01:52PM (#37297912)
Rust shares a lot of performance advantages around pointer aliasing with fortran. In fortran, pointers can't alias by default, and in rust, the borrow checker should be able to infer that a shared and exclusive reference don't alias, allowing the compiler to assume that it's not writing to input values of a loop, etc.

In C, pointers can alias by default. The last time I checked, that made these sorts of optimizations harder. However, I'm not sure how measurable the performance impact is these days.

Re:Fortran by pklausler on Monday August 28, 2023 @03:19PM (#37299124)
Fortran pointers must be assumed to alias. It's Fortran's dummy arguments that must not alias.