in reply to Re: Why this code run faster?
in thread Why this code run faster?
When I tested with and without /g, the regex with /g would complete its run in 2.75 +/- 0.1 seconds, and without /g completed in 3.70 +/- 0.1 seconds on the CPU. This result was consistent across runs, and did not depend on the case of the regex.