0
Answered

sort performance

ccc 4 aastat tagasi uuendaja Pavel Holoborodko 4 aastat tagasi 1

what is the performance of sort function of this toolbox?

Are there any comparison studies?

Vasta

+1
Vasta
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
Vasta
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.