This is a static copy of a profile report

Home

parenReference_1D (Calls: 618310, Time: 0.790 s)
Generated 04-Jun-2021 04:11:11 using performance time.
function in file C:\Program Files\MATLAB\R2020b\toolbox\matlab\datatypes\shared\matlab_datatypes\+matlab\+internal\+datatypes\parenReference_1D.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
categorical.parenReferencefunction618310
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
13
end
6183100.085 s10.7%
9
if ischar(rowIndices) &&am...
6183100.031 s3.9%
12
data = data(rowIndices);
6183100.027 s3.4%
11
else
6183100.025 s3.2%
All other lines  0.622 s78.7%
Totals  0.790 s100% 
Children (called functions)
No children
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function13
Non-code lines (comments, blank lines)8
Code lines (lines that can run)5
Code lines that did run4
Code lines that did not run1
Coverage (did run/can run)80.00 %
Function listing
time 
Calls 
 line
   1 
function data = parenReference_1D(data,rowIndices)
   2 
%PARENREFERENCE_1D Subscripting helper for 1D paren reference.
   3 
%   DATA = PARENREFERENCE_1D(DATA,ROWINDICES) returns the specified
   4 
%   rows from a column vector, i.e. DATA(ROWINDICES). PARENREFERENCE_1D
   5 
%   has an optimized special case when ROWINDICES is ':'.
   6 

   7 
%   Copyright 2019-2020 The MathWorks, Inc.
   8 

  0.031 
 618310 
   9
if ischar(rowIndices) && isscalar(rowIndices) && (rowIndices == ':') % inline matlab.internal.datatypes.isColon 
  10 
    data = data(:); % literal colon for performance
  0.025 
 618310 
  11
else 
  0.027 
 618310 
  12
    data = data(rowIndices); 
  0.085 
 618310 
  13
end