% Two million logistic maps x <- r x (1 - x) iterated 4000 times in % lockstep (8 billion updates). The loop body compiles once and replays. n = 2000000; niter = 4000; r = 3.5 + 0.5*rand(n, 1); x = rand(n, 1); tic; for k = 1:niter x = r .* x .* (1 - x); end t = toc; fprintf('%.0f million map-updates/sec\n', niter*n/1e6/t); fprintf('mean x after %d iterations: %.4f\n', niter, mean(x));