for loop running time analysis
Mostrar comentarios más antiguos
Profiler shows that "end" line takes a large part of the running time of for loop. Why? Do jump instructions really run longer than calculation process?

Respuesta aceptada
Más respuestas (1)
rajat aggarwal
el 15 de Mayo de 2020
0 votos
Yes jump statement takes more time then usual line and here in your case you are using end statement in a loop. Jump statement hinders the workflow of a program. Usually Program counter jumps from one position to another position and start executing the instruction stored there. It requires time. Therefore jump statements take more time than usual statemtents.
Categorías
Más información sobre Loops and Conditional Statements en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!