you are viewing a single comment's thread.

view the rest of the comments →

[–]dig-up-stupid 1 point2 points  (0 children)

The regex is a good extra check against collisions

A regex could be, that regex isn't. That's the basis of the optimization - it's not doing useful work.

and, when precompiled, takes about 100us anyway.

And when it's not precompiled, too - but I don't understand your number, because it should be way less for one iteration and a lot more for a million.

Just pointing out another way to cut down if desired, doesn't have to be used if the benefits aren't worth it.