In my view, it does not make any difference.
Of course, in the parent script, the step "Perform Script" is itself one step, the next step is then the If step in the subscript, and if the calc returns False, you get right to End If and exit the subscript, bringing you back to the line after Perform Script in the parent script. So I don't see your script as inefficient, I believe it has negligible overhead.
Wanted to make sure before I sprinkled that generic script inside more scripts.
You will only see a difference, if you loop the script thousands of times
Try it. Use milliseconds to set a time variable
> if it is the subscript (writeLog) that checks if $$DebugMode=1, would each call to the subscript affect the performance of the parent script ?