News for hackers. Stuff that matters.
Re:Lfortran: Modern interactive LLVM-based Fortran compiler by jcranmer on Monday August 28, 2023 @01:07PM (#37297261)
Fortran has true multidimensional arrays in a way that C doesn't have--if you know an array is 5x3, you know that A[6, 1] doesn't map to a valid element whereas in C, it does map to a valid element. This turns out to make a lot of loop optimizations easier. (Also, being Fortran, you tend to pass around arrays with size information anyways, which C doesn't do, since you typically just get pointers with C).
Re:Lfortran: Modern interactive LLVM-based Fortran compiler by WanderPanda on Monday August 28, 2023 @06:15PM (#37301066)
Is the size info compile-time or runtime in Fortran?
Re:Lfortran: Modern interactive LLVM-based Fortran compiler by certik on Monday August 28, 2023 @06:42PM (#37301323)
It can be both. If you know the dimension at compile time, it is compile time, if you don't it will be runtime.