Hacker News new | ask | show | jobs
by eesmith 2243 days 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.