Hacker News new | ask | show | jobs
by lqet 2673 days ago
My initial comment was easy to misunderstand, sorry: I was just wondering whether the additional A-Z check was doing something I was not aware of.
1 comments

It's slightly more efficient to squeeze non-alphabetic characters first and then convert to lowercase, rather than vice versa, because in the former case most of the non-alphabetic characters only get processed once, compared to twice in the latter case.