Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
End statement constitutes 28s of execution time...options?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I have some object oriented MATLAB functions running through several iterations over tiles of an image. I profiled the code to optimize for testing on a set of 3800+ images. The issue is that the profiler tells me that 1 simple end statement with a comment afterwards is taking 28s of the 150s total execution time, being parsed 357,000+ times. All appropriate code optimizations have been made. This similarly occurs in another function, consuming 8 more seconds in 706,000+ parsings...Additionally, an if statement with 4 clauses consumes 13s with the same number of parsings.
Firstly, I don't understand how an end statement being parsed nearly twice as many times is nearly 4 times faster to parse than another end statement. Secondly, how has Mathworks not found a solution to this issue...?
Is the parsed characteristic of MATLAB code execution really introduce such terrible overhead? Are there any settings I can change? I'm avoiding the use of MEX files if possible. Looking to not run 3800 tests over 7 days...
Thanks in advance, Vlad
0 comentarios
Respuestas (0)
La pregunta está cerrada.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!