qsort_b in Swift

Gerriet M. Denkmann

I have an array:

var sortedArray = [UInt32]()
for _ in 0 ..< limit { sortedArray.append( arc4random() ) }

This works fine.

I would like to compare the efficiency of “sort” with “qsort_b”, but cannot figure out how to call it in Swift.
Any help would be greatly appreciated.


Join cocoa@apple-dev.groups.io to automatically receive all group messages.