Hacker News new | ask | show | jobs
by fancyfredbot 2238 days ago
It's not wrong! For some value of N it is an order of magnitude faster. It's just a bit misleading.
1 comments

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.