Hi,
I'm curious about the behaviour of Tic-Toc.
Tic-Toc excutes faster in a loop than outside a loop.
Does anyone know exactly why? Some sort of JIT compiliation issue?
Loop Version
TicTocLoop = 0;for i =1:1:1 tic; TicTocLoop(i) = toc;endTicTocLoop
TicTocLoop = 4.8400e-05
Non-Loop Version
TicTocValue = 0;tic;TicTocValue = toc;TicTocValue
TicTocValue = 0.0011
My setup is
MATLAB 2020b
Windows 10
Using Live Script
Thanks for any help
Regards
Cillian
Best Answer