We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The use of implied DO-loops leads to a better performance, see link.
The text was updated successfully, but these errors were encountered:
Yes, an implicit do loop (for perf.f90) is more efficient:
subroutine printfd(n) integer, intent(in) :: n integer :: i character(*), parameter :: newline = new_line("") open(unit=1, file="/dev/null") write(unit=1, fmt=*) (i, i+1, newline, i=1, n) close(unit=1) end subroutine
newline is a carriage return. Maybe we can create a PR for this.
newline
Sorry, something went wrong.
Thanks @zoziha. I have checked your version with gfortran and ifort. Could you please create a PR?
Using GNU Fortran (GCC) 12.1.0: gfortran perf.f90
gfortran perf.f90
Using ifort (IFORT) 2021.5.0 20211109: ifort perf.f90
ifort perf.f90
But I'm not sure if using an implicit do loop is "cheating"? Other languages use the usual for loop.
do
for
No branches or pull requests
The use of implied DO-loops leads to a better performance, see link.
The text was updated successfully, but these errors were encountered: