- #1
confi999
- 19
- 0
Hello,
In Fortran 90, will the performance (in terms of computational efficiency) of the following two be the same. If not, which one will be faster. Please advise with the reasoning:
(i)
do i = imin,imax
do j = jmin,jmax
do k = kmin,kmax
Several statements (rigorous arithmetic manipulation) involving a(i,j,k) and b(1,i,j,k)
end do
end do
end do
(ii)
do k = kmin,kmax
do j = jmin,jmax
do i = imin,imax
Several statements (rigorous arithmetic manipulation) involving a(i,j,k) and b(1,i,j,k)
end do
end do
end do
Thank you very much.
In Fortran 90, will the performance (in terms of computational efficiency) of the following two be the same. If not, which one will be faster. Please advise with the reasoning:
(i)
do i = imin,imax
do j = jmin,jmax
do k = kmin,kmax
Several statements (rigorous arithmetic manipulation) involving a(i,j,k) and b(1,i,j,k)
end do
end do
end do
(ii)
do k = kmin,kmax
do j = jmin,jmax
do i = imin,imax
Several statements (rigorous arithmetic manipulation) involving a(i,j,k) and b(1,i,j,k)
end do
end do
end do
Thank you very much.