5 ms·
It actually used to call this, but was changed in 2015: https://github.com/golang/go/commit/fd4dc91a96518fdbb47781f97ba43ae36df215a5 https://github.com/golang/g
by Beltalowda 4y ago
It actually used to call this, but was changed in 2015: https://github.com/golang/go/commit/fd4dc91a96518fdbb47781f97ba43ae36df215a5 https://github.com/golang/go/commit/fd4dc91a96518fdbb47781f9...
I'm not entire sure if I see the problem or follow why just using runtime·cmpstring is such a bad thing; doesn't seem that "overengineered" to me.
- esprehn 4y agoYeah, that's a pretty small amount of clean up. Someone should try to revert the patch and reland it.
- icholy 4y agoIt's because people started putting "always use strings.Compare" in their style guides.
- tapirl 4y agoEven if strings.Compare is optimized, it is not always better than general comparison operators. Both strings.Compare and comparison operators have their respective best use scenarios.
- twic 4y ago> The function is here ONLY for symmetry with package bytes. > This function should be used ONLY if it makes code clearer. > It is not here for performance. Remove any performance benefit. Insane troll logic, pure and simple.