News for hackers. Stuff that matters.
Re:Fortran by weinzierl on Monday August 28, 2023 @10:21AM (#37294449)
> "the "winning" strategy is to have high-level scripting languages where you can ignore most of the details, which call into hyper-optimized, high performance libraries. For instance, when you're using Scipy, you call into Fortran and C almost interchangeably"

That's nice as long as it works, but in my experience gets ugly when it doesn't. While we can currently witness this being a successful model, the impedance mismatch between both worlds is often a pain.

I bet on a language like Rust as the winning strategy in the long run - high level like Python but still close to the metal and all in one language, one compiler, one ecosystem.

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.