为什么带有“ use module”语句中的数组的子例程比具有本地大小的数组的同一个子例程具有更快的性能?
Related to this question, but I believe the issue is more clearly identified with this example.
我有一些看起来像这样的旧代码:
subroutine ID_OG(N, DETERM)
use variables, only: ID
implicit real (A-H,O-Z)
implicit integer(I-N)
DETERM = 1.0
DO 1 I=1,N
1 ID(...