2 ms·
I think for the ASCII/Latin characters you selected you’re probably right, but the moment you’re matching Unicode explicitly or characters in the Unicode range
by eyelidlessness 6y ago
I think for the ASCII/Latin characters you selected you’re probably right, but the moment you’re matching Unicode explicitly or characters in the Unicode range implicitly (JS strings are always Unicode), those substitutions may become more complex and deoptimize (or just require additional engineering effort).