------------- tic() f=0. A=[1:100] for i=1:10000000 f += A[20] end toc()
elapsed time: 0.891431009 seconds ------------- tic() f=0. A=[1:100] for i=1:10000000 A = randperm(100) f += A[20] end toc() elapsed time: 60.348117087 seconds
------------- tic() f=0. A=[1:100] for i=1:10000000 f += A[20] end toc()
elapsed time: 0.891431009 seconds ------------- tic() f=0. A=[1:100] for i=1:10000000 A = randperm(100) f += A[20] end toc() elapsed time: 60.348117087 seconds