In the example case where s[0] == s[1], it might be an order of magnitude slower, if there's much object initialization for the lookup table.
In the example case where s[0] == s[1], it might be an order of magnitude slower, if there's much object initialization for the lookup table.