6th February 2017, 1 min read Sorting sorted arrays in Swift 2 thoughts on “Sorting sorted arrays in Swift” Arseny Kapoulkine says: February 7, 2017 at 5:04 am I am not sure I’m looking at the right source code, but this looks like a median-of-3: https://github.com/apple/swift/blob/master/stdlib/public/core/Sort.swift.gyb#L166-L172 Oscar says: February 7, 2017 at 10:38 am Yes, looks like this was fixed in https://github.com/apple/swift/commit/606bf83af393cdde2ff4de419e833de77226e90f
I am not sure I’m looking at the right source code, but this looks like a median-of-3:
https://github.com/apple/swift/blob/master/stdlib/public/core/Sort.swift.gyb#L166-L172
Yes, looks like this was fixed in https://github.com/apple/swift/commit/606bf83af393cdde2ff4de419e833de77226e90f