Why does the Matlab Profiler say there is a bottleneck on the 'end' statement of a 'for' loop?

后端 未结 1 1792
隐瞒了意图╮
隐瞒了意图╮ 2020-12-11 02:35

So, I\'ve recently started using Matlab\'s built-in profiler on a regular basis, and I\'ve noticed that while its usually great at showing which lines are taking up the most

相关标签:
1条回答
  • 2020-12-11 03:19

    When I've seen this in my code, it's been the deallocation of large temporaries created in the loop. Each new variable created in the loop is deallocated at the end.

    0 讨论(0)
提交回复
热议问题