Does preventing the use of global variables make the code faster?

Got it, thanks!

My module is more like some big subroutines, I actually wanted to improve it a little bit.
Thank you for your good suggestions!

You may know this already (but just in case you or others did not), there are also online Fortran compilers on the web that are super helpful for quick testing of Fortran code snippets. Here are some examples:

  1. tutorialspoint
  2. rextester
  3. onlinegdb (required setting the language to Fortran)
  4. jdoodle

or godbolt to inpect the compiler-generated assembly code.

3 Likes