Behavior of "SORT M AS N"

Post Reply
smbstarv
Posts: 110
Joined: Wed Nov 27, 2013 3:44 pm
My devices: Ipad 6th gen
Flag: Netherlands
Contact:

Behavior of "SORT M AS N"

Post by smbstarv »

I came across a peculiar behavior of the "SORT M AS N" function.
If M contains mostly equal values, I found that the time to sort is growing rapidly.
E.g. Sorting an Array of 10000 with only 50 non zero numbers takes so long that the program seemingly stalls.
Furthermore you can not stop the sorting then. You have to stop the Smartbasic app itself !

"SORT M TO B" does not show this behavior.

smbstarv
Posts: 110
Joined: Wed Nov 27, 2013 3:44 pm
My devices: Ipad 6th gen
Flag: Netherlands
Contact:

Re: Behavior of "SORT M AS N"

Post by smbstarv »

To illustrate: 2 examples
Attachments
SORT M TO IDX.txt
(114 Bytes) Downloaded 31 times
SORT M AS IDX.txt
(114 Bytes) Downloaded 29 times

smbstarv
Posts: 110
Joined: Wed Nov 27, 2013 3:44 pm
My devices: Ipad 6th gen
Flag: Netherlands
Contact:

Re: Behavior of "SORT M AS N"

Post by smbstarv »

I had hoped that Mr. K would respond....

Post Reply