This is a static copy of a profile report

Home

tabularDimension>tabularDimension.selectFrom (Calls: 108859, Time: 1.941 s)
Generated 04-Jun-2021 04:11:12 using performance time.
class method in file C:\Program Files\MATLAB\R2020b\toolbox\matlab\datatypes\tabular\+matlab\+internal\+tabular\+private\tabularDimension.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
varNamesDim>varNamesDim.selectFromclass method38264
...mension>tabularDimension.subs2indsclass method70595
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
112
obj.labels = obj.orientAs(obj....
1079341.458 s75.1%
116
if isnumeric(toSelect) &&a...
1079340.169 s8.7%
120
obj.length = numel(obj.labels)...
1079340.145 s7.5%
132
end
1088590.018 s0.9%
111
if obj.hasLabels
1088590.017 s0.9%
All other lines  0.135 s6.9%
Totals  1.941 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
isUniqueNumericfunction386340.125 s6.4%
rowNamesDim>rowNamesDim.orientAsclass method696700.099 s5.1%
varNamesDim>varNamesDim.orientAsclass method382640.052 s2.7%
Self time (built-ins, overhead, etc.)  1.666 s85.8%
Totals  1.941 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function28
Non-code lines (comments, blank lines)11
Code lines (lines that can run)17
Code lines that did run9
Code lines that did not run8
Coverage (did run/can run)52.94 %
Function listing
time 
Calls 
 line
 105 
        function obj = selectFrom(obj,toSelect)
 106 
            %SELECTFROM Return a subset of a tableDimimension for the specified indices.
 107 
            % The indices might be out of order, that's OK or repeated, that's handled.
 108 
            import matlab.internal.datatypes.isUniqueNumeric
 109 
            import matlab.internal.datatypes.isColon
 110 
            
  0.017 
 108859 
 111
            if obj.hasLabels 
  1.458 
 107934 
 112
                obj.labels = obj.orientAs(obj.labels(toSelect)); 
 113 
                
 114 
                % Only numeric subscripts can lead to repeated rows (thus labels), no
 115 
                % need to check otherwise.
  0.169 
 107934 
 116
                if isnumeric(toSelect) && ~isUniqueNumeric(toSelect) 
 117 
                    obj = obj.makeUniqueForRepeatedIndices(toSelect);
  0.005 
 107934 
 118
                end 
 119 
                
  0.145 
 107934 
 120
                obj.length = numel(obj.labels); 
< 0.001 
    925 
 121
            elseif isnumeric(toSelect) 
  0.005 
    925 
 122
                obj.length = numel(toSelect); 
 123 
            elseif islogical(toSelect)
 124 
                obj.length = sum(toSelect);
 125 
            elseif isColon(toSelect)
 126 
                % leave obj.length alone
 127 
            elseif isa(toSelect,'matlab.internal.ColonDescriptor')
 128 
                obj.length = toSelect.length;
 129 
            else
 130 
                assert(false);
  0.005 
 108859 
 131
            end 
  0.018 
 108859 
 132
        end 

Other subfunctions in this file are not included in this listing.