It doesn't hurt to pass ro variables to mask_block_params.
All methods mentioned here require the same cpu time. That reminded me that the replace is not the slow part, matching is the slow one. So what I thought is get rid of html like attributes, this was a pretty good speed improvement. 12s to 1s.
Looks like the second .*? is pretty expensive.
In reply to Re^2: Regex speed issue
by mtsachev
in thread Regex speed issue
by mtsachev
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |