for the sake of fair comparison, the code below should give you reasonable results
TicTocLoop=0;
TicTocValue=0;
for i =1:1:1
tic;
TicTocLoop = toc
end
tic;
TicTocValue=toc
TicTocLoop =
2.7100e-05
TicTocValue =
1.2300e-05
TicTocLoop =
2.4100e-05
TicTocValue =
1.3000e-05
TicTocLoop =
2.4400e-05
TicTocValue =
1.3300e-05
Best Answer