4 ms·
True, but then you have the overhead of string concatenation... although in the large scheme of things that is probably very small, unless you are doing it in a
by elijahmanor 15y ago
True, but then you have the overhead of string concatenation... although in the large scheme of things that is probably very small, unless you are doing it in a huge loop, but then you'd cache that RegExp anyway.
- natrius 15y agoConcatenation of string literals can be compiled away.