N = 1e3;

x = [1e6:-1:1]';
y = x + 1i;
z = zeros (size (x));

bm1 = bm2 = bm3 = zeros (N,1);
for i = 1:N
  tic;
  z = sort (x);
  bm1(i) = toc;
  tic;
  z = sort (y);
  bm2(i) = toc;
  tic;
  z = sort (abs (y));
  bm3(i) = toc;
endfor

mean (bm1)
mean (bm2)
mean (bm3)
