Your question is one of scope, I think. Setting
to a compiled regex once per loop, then using it in many matches and/or substitutions later in the loop is one thing. Setting it to not recompile even when otherwise told to do so is another. We could discuss at great length the merits and faults with having those two options, but precompiling the regex once per loop iteration for a loop with two dozen matches using that regex I think still makes sense.