execution speed changes by sequence of running the code
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
the question updated: the sequence of running different codes changes the run time.
--------------
initially it appeared to be due to difference in file name: any similar experience? changing the function name is changing the execution time (picture attached).

2 Commenti
Risposta accettata
Steven Lord
il 4 Apr 2017
There is some first run overhead (see the "Tips for Measuring Performance" section of that page.) So if you compare the Nth (N > 1) run of one function and the 1st run of another function that contains the same code in a different file, in the latter case you'll measure the overhead in addition to the execution of the code.
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Logical in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!