Filter löschen
Filter löschen

Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

End statement constitutes 28s of execution time...options?

3 Ansichten (letzte 30 Tage)
Vladimir
Vladimir am 29 Aug. 2011
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
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

Antworten (0)

Diese Frage ist geschlossen.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by