A relevant benchmark would factor in the time to build the mask while preserving the real application's ratio of mask rebuilds to the number of operations found. Right now, you ignore the time to build the mask in two tests, while including it in the third test.
Depending on that ratio, substrList is faster than andOrAndNot.
In reply to Re^3: Masking part of a string
by ikegami
in thread Masking part of a string
by citromatik
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |