N = 1e3;

data = ones (1e6, 1);

tic;
for i = 1:N
  if (data)
  endif
endfor
bm1 = toc

tic;
for i = 1:N
  if (all (data))
  endif
endfor
bm2 = toc
