estimateListSort estimates l.sort() under ModelVersion0.
(t *types.Type, legacy bool)
| 1135 | |
| 1136 | // estimateListSort estimates l.sort() under ModelVersion0. |
| 1137 | func estimateListSort(t *types.Type, legacy bool) cost.FunctionEstimator { |
| 1138 | return func(estimator cost.Estimator, target *cost.AstNode, args []cost.AstNode) *cost.CallEstimate { |
| 1139 | if target == nil || len(args) != 0 { |
| 1140 | return nil |
| 1141 | } |
| 1142 | return estimateSelfCompareCost(estimator, *target, *target, t, legacy, false) |
| 1143 | } |
| 1144 | } |
| 1145 | |
| 1146 | // estimateListSortBy estimates l.sortBy() under ModelVersion0. |
| 1147 | func estimateListSortBy(u *types.Type, legacy bool) cost.FunctionEstimator { |
no test coverage detected