フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

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

3 ビュー (過去 30 日間)
Vladimir
Vladimir 2011 年 8 月 29 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
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 件)

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by