Please see the text file attached. It is just the parts of the original 'Quick Sort' code that I copied and adjusted.
I call it like this:
Code:
Dim now As Long : now = DateTime.now
QuickSort(0, MyArray.Length - 1)
Msgbox("It took: "&(DateTime.now - now)&" ms", "")
The MyArray array has 5,000 items for this test and it took around 22 seconds on the emulator.