stringTransformEvalCost is the EvalCost of the O(n) string transforms: a scan of the receiver and the result's length.
()
| 903 | // stringTransformEvalCost is the EvalCost of the O(n) string transforms: a scan of the receiver |
| 904 | // and the result's length. |
| 905 | func stringTransformEvalCost() cost.OverloadModelOption { |
| 906 | return cost.EvalCost(cost.Sum(cost.Const(cost.CallCost), cost.StringScan(cost.Length(cost.Target())), cost.Length(cost.Result()))) |
| 907 | } |
| 908 | |
| 909 | // stringCharAtCostModel models charAt: it scans the receiver and returns a single code point, which |
| 910 | // is at most 4 UTF-8 bytes under the aggregate strategy and never above the receiver's size. |
no test coverage detected