0
Answered

sort performance

ccc 4 years ago updated by Pavel Holoborodko 4 years ago 1

what is the performance of sort function of this toolbox?

Are there any comparison studies?

Answer

+1
Answer
Answered

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
Answer
Answered

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.