Hello,
I needed to sort a list, and was thrilled to discover a command to do just that. I have been playing around with it a bit, and it seems to be very slow?? I use the small code below, to test the command. Just change the first line to change the number of entries that should be sorted. It varies a bit, but if I sort 1000 entries it takes around 0,13 seconds. 5000 takes 3,13 seconds, and 10000 takes a whopping 12,48 secs.
Is there ANY way to speed this up?
EDIT: for the program I work on, I need to sort somewhere between 15000 and 20000..
I needed to sort a list, and was thrilled to discover a command to do just that. I have been playing around with it a bit, and it seems to be very slow?? I use the small code below, to test the command. Just change the first line to change the number of entries that should be sorted. It varies a bit, but if I sort 1000 entries it takes around 0,13 seconds. 5000 takes 3,13 seconds, and 10000 takes a whopping 12,48 secs.
Is there ANY way to speed this up?
EDIT: for the program I work on, I need to sort somewhere between 15000 and 20000..
entries:Int=5000 'number of entries in list mylist:TList=CreateList() number:Int=0 SeedRnd MilliSecs() For a:Int=1 To entries number=Rnd(1,255) ListAddLast mylist,Chr$(number) Next 'Sort it.. timestart#=MilliSecs() SortList mylist timeend#=(MilliSecs()-timestart)/1000 Print ; Print entries+" entries sorted in: "+timeend+" secs." End