you maybe need to give it a break before you start measuring because right after the start of the exe windows still has to do some parallel threads / memorymanagement etc.
try Delay 1000
t1=millisecs()
...
Maybe you also need to do the optimized function multiple times to be able to measure it accurately.
try Delay 1000
t1=millisecs()
...
Maybe you also need to do the optimized function multiple times to be able to measure it accurately.