2 ms·
> Making a random function faster and harder to maintain is bad engineering if the speed isn’t useful. 1) It's not some random function, it's part of the stand
by adwn 4y ago
> Making a random function faster and harder to maintain is bad engineering if the speed isn’t useful.
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".