10.02.2015, 09:56
Quote:
eciN, but, can you give me some speed test? (I cant do it, because my PC dont work).
|
Quote:
This looks like BubbleSort, which is a VERY slow sorting algorithm, and is recursive, which PAWN is not good at. Have you tried this on an array of, say 1000 unsorted elements? I'm pretty sure the server will run out of memory, after a long time. I suggest you read up on the algorithmic complexity of bubblesort vs quicksort.
|
And yes, i noticed it didn't work on arrays of bigger sizes (1000~ +), unfortunately....
I've been reading briefly about sorting algorithms but i haven't wrapped my head around what makes quicksort so much faster (yet).
Quote:
There is already a sorting include for pawn in the CRF, https://github.com/codectile/CRF-Lib...er/c_arlib.inc
|