Well, that makes things clearer: the tree-dump for the optimised version shows that both get_elem_ndim and get_pointer are eliminated then. Hence the performance difference.
Arjen
21
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Performance impact of how a large array is accessed | 49 | 2258 | June 4, 2023 | |
| On the creation of temporary arrays when passing type element arguments | 24 | 3882 | September 27, 2021 | |
| Slow-down of a program built with gfortran in an Intel oneAPI command window | 43 | 1103 | October 7, 2025 | |
| Comments in ResearchGate about Fortran | 16 | 1081 | February 11, 2021 | |
| Why is my code compiled with GFortran on Windows slower than on Ubuntu? | 51 | 6082 | May 3, 2022 |