I've noticed when doing vectorized operations with advanpix mp data structures, it's extremely slow compared to Matlab. For example, consider the follow code where I initialize 1000x1000 sparse, random matrices using both Matlab double and advanpix double data structures:
A_matlab = sprand(1000,1000,.2);
A_advanpix = mp(sprand(1000,1000,.2),16);
I then time the operation of "zeroing out" the first 100 rows in each
A_matlab(1:100,:) = 0;
toc Elapsed time is 0.008518 seconds.
A_advanpix(1:100,:) = 0;
toc Elapsed time is 2.534518 seconds.
Of course, this naturally gets much worse as the size of A increases. Is this behavior expected or am I using the advanpix data structures incorrectly?
Customer support service by UserEcho