0
Beantwortet

sort performance

ccc vor 4 Jahren aktualisiert von Pavel Holoborodko vor 4 Jahren 1

what is the performance of sort function of this toolbox?

Are there any comparison studies?

Antwort

+1
Antwort
Beantwortet

We use quicksort algorithm, which is pretty much de-facto standard in all programming languages.

If we compare sort speed of our toolbox and VPA: 


>> A = vpa(rand(10000,1));
>> tic; sort(A); toc;
Elapsed time is 0.065205 seconds.

>> A = rand(10000,1,'mp');
>> tic; sort(A); toc;
Elapsed time is 0.003493 seconds.

So, our toolbox is ~19 times faster.

+1
Antwort
Beantwortet

We use quicksort algorithm, which is pretty much de-facto standard in all programming languages.

If we compare sort speed of our toolbox and VPA: 


>> A = vpa(rand(10000,1));
>> tic; sort(A); toc;
Elapsed time is 0.065205 seconds.

>> A = rand(10000,1,'mp');
>> tic; sort(A); toc;
Elapsed time is 0.003493 seconds.

So, our toolbox is ~19 times faster.