% Reductions take a fused loader: dot, norm and max each read their % operands exactly once -- sum(a.*b) is one pass, not two. n = 10000000; a = rand(n, 1); b = rand(n, 1); tic; d = dot(a, b); nrm = norm(a - b); mx = max(abs(a - b)); toc fprintf('dot %.0f norm %.2f max %.6f\n', d, nrm, mx);