Number of Calls - Matlab Profiler Data

조회 수: 3 (최근 30일)
Evans Harrigan
Evans Harrigan 2020년 11월 16일
댓글: Fangjun Jiang 2023년 1월 30일
Dear Colleagues,
We are testing several Matlab software functional prototypes for algorithm correctness, then performance optimization will be done. Initially, optimization is focussed on the number of calls (references) to computationally expensive routines and primitives to identify potential issues in For Loops construction. Here is a summary of of the number of calls data in a Matlab Profiler execution:
MATLAB Profiler Output:
Function Name Calls Total Time Self Time
Run Main 1 M sec m sec
Subroutine 1 K N sec n sec
Subroutine 2 2K*L J sec j sec
Code Example:
Subroutine 1
For j = 1, L
Call Subroutine 2
Inline code1
Ÿ Call Subroutine 2
:
Inline code2
End For
Variables ranges for this example:
0 < m M
0 < n < N
0 < j < J
L ≥ 1
We assume that number of calls for the nesting described will follow this pattern.
  댓글 수: 4
Mallika
Mallika 2023년 1월 30일
편집: Mallika 2023년 1월 30일
what is total number of calls in the profile Report
Fangjun Jiang
Fangjun Jiang 2023년 1월 30일
@Mallika, The Profiler is run on "Main". It runs only once. If "Subroutine 1" is called "K" times, then "Subroutine 2" is called 2K*L times based on the illustration. All numbers are correct.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Function Creation에 대해 자세히 알아보기

태그

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by