JS RegEx's Are Slow
I've been trying to avoid regular expressions in dojo.query. It's a difficult tradeoff since regexes are very space efficient vs. lots of
indexOf operations. A little digging on the point turned up a fascinating article on why regexes in most languages are slower than they need to be.
Now if only there were some explanation of why regular expression string replacement, not just matching, is brutally slow across the board.