4 ms·
Optimization is typically a strength of Fortran. Do you recall which compiler switches you were using for the respective compilers and a code snippet. I have
by kenjackson 16y ago
Optimization is typically a strength of Fortran. Do you recall which compiler switches you were using for the respective compilers and a code snippet. I have access to many compilers and would be happy to take a look at the code gen you're seeing versus what is expected.
- deleted 16y ago[deleted]
- aeroevan 16y agoAnd/Or hop on #fortran on irc.freenode.net :)
- pmjordan 16y agoI graduated almost 4 years ago, so this would have been even longer ago. I therefore can't remember the exact situation, but I think I was for some reason performing dot products on 3-vector elements of one or two Nx3 (or 3xN?) matrices. (possibly to get magnitudes, I forget) Using the dot() (?) function was substantially slower than a simple multiply/accumulate loop. The latter was successfully unrolled, the former produced an actual function call, of course not unrolling the loop. I'm pretty sure this was -O2 on an Intel compiler. This was in some exercise in optimising an existing algorithm's code. I remember scoring better than the lecturer's version despite missing the uninlined dot product. :)