by philosopher1234 · 4y ago · 0 comments
1) It's not some random function, it's part of the standard library.
2) Three-way string compares are far from uncommon, and string comparisons are relatively expensive. Therefore, a speedup would be useful.
Optimizing this function would not count as "premature".