> If people really need the extra performance, they'll use unsafe to create byte slices backed by the strings, and then use bytes.Compare
...and thus very likely end up with buggy code.
...and thus very likely end up with buggy code.
Though, if 3 way compare is the bottleneck, it seems like a real possibility that there are algorithmic optimizations that may be more effective than a faster 3 way compare, like using native comparison operators, hashing, using byte slices, etc. Or maybe not; I don't think I've seen a case where it's a bottleneck so I might be inaccurately imagining the cases where it'd happen.
I agree. Squeaky wheel gets the grease.