<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hey Swift-Dev,<div class=""><br class=""></div><div class="">The swift standard library team &nbsp;have been working on a new implementation for comparing Swift strings for Swift 5. Michael touched on the motivations in the State of String email but I’ll summarize here:</div><div class=""><br class=""></div><div class=""><ul class="MailOutline"><li class="">The Swift String comparison implementations on Apple platforms and Linux differ in results and performance. Apple platforms use CFStringCompare with no locale, while Linux uses ICU libraries. Unifying the algorithms that Swift strings use for comparison is reason alone for doing a new implementation.&nbsp;</li><li class="">We've come up with some great common fast paths that speed up comparisons for a lot of common cases. Our microbenchmarks show up to a 6.8x increase in performance and there is still some low hanging fruit in our implementation that would bring further speedups.&nbsp;</li></ul></div><div class=""><br class=""></div><div class="">Bare in mind this is not intended to be a replacement for sorting strings that will be presented to users, for that developers should stick to NSLocalizedString APIs.&nbsp;</div></body></html>