2 ms·
For another value of N it's three orders of magnitude faster. In the example case where s[0] == s[1], it might be an order of magnitude slower, if there's much
by eesmith 7y ago
For another value of N it's three orders of magnitude faster.
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.