4 ms·
I wonder if it includes more digits than necessary :)
by ilogik 10y ago
I wonder if it includes more digits than necessary :)
- tgb 10y agoThat's easy to check even with just ctrl+f: the last six digits are 422990 which occur 8 times throughout that string. Hence, we could remove at least the last digit without losing anything.
- oneeyedpigeon 10y agoIt also includes sequences that can never match such as "999". I wonder if overwriting those with a non-digit would allow indexOf to be infinitesimally faster?
- zulln 10y agoIt certainly does not, see this comment: https://news.ycombinator.com/item?id=13868201 https://news.ycombinator.com/item?id=13868201 You can remove some digits and get the same result as today (see https://news.ycombinator.com/item?id=13867324 https://news.ycombinator.com/item?id=13867324), but as it lack so many situations as it does I would not say so.