Testing whether an argument is PRESENT is very fast

I really don’t think much of any meaningful insights can be gained from the kinds of micro tests like in the original post here.

In actual practice, the technical community who get enamored by the OPTIONAL argument feature and who write code for engineering and scientific applications tend to create subroutines “from hell” with two or more optional dummy arguments, often much higher in number. Like the one in this thread, albeit a made-up example in Modern Fortran Explained (8th Edition incorporating 2018).

The challenge then ain’t the immeasurably small cost with the PRESENT intrinsic, rather the entire edifice of extremely convoluted program logic and workflow that accompanies the handling of optional parameters and corresponding program data that then leads not only to certain run-time cost but also an unbearably larger one with code readability and program maintenance and support.