Re:Why physicists still use Fortran
by Manishearth on Monday December 19, 2016 @02:09AM
(#13209947)
> What does arr[(1,2,3)] have to do with what I asked for
"has pretty syntax", was just showing what the syntax would look like in Rust.
LLVM autovectorizes, and does many loop optimizations. I suspect LNO exists, but if it doesn't there's nothing preventing it from being added afaict.
Was mostly explaining what the status of this in Rust is. It's not awesome, but not horrible either.
Re:Why physicists still use Fortran
by greglindahl on Monday December 19, 2016 @02:35AM
(#13210051)
Thanks for trying to be helpful. The place where C and C++ goes wrong is multi-dimensional arrays. Some googling tells me that narray gives Rust syntax like foo[[1,2,3]] for a 3 dimensional array. I have no guess if this optimizes well or not.
Re:Why physicists still use Fortran
by Manishearth on Monday December 19, 2016 @02:43AM
(#13210077)
It will compile down to `foo[1][2][3]` and get optimized the same way. Rust additionally does hint a lot more about aliasability to LLVM (everything is restrict by default, basically), so there probably is more scope for optimization here.
No array slices needed. Plain Fortran 77 notation provides what I need.