listsRangeCostModel models lists.range(n): it builds n ints, each of size 1 under both built-in strategies.
(id string)
| 1237 | // listsRangeCostModel models lists.range(n): it builds n ints, each of size 1 under both built-in |
| 1238 | // strategies. |
| 1239 | func listsRangeCostModel(id string) cost.OverloadModel { |
| 1240 | return cost.Overload(id, |
| 1241 | cost.EvalCost(cost.AllocList(cost.Length(cost.Result()))), |
| 1242 | cost.ResultSize(cost.List(cost.IntArg(0, math.MaxUint), cost.Const(1))), |
| 1243 | ) |
| 1244 | } |
| 1245 | |
| 1246 | func listReverseCostModel(id string) cost.OverloadModel { |
| 1247 | return cost.MemberOverload(id, |
no test coverage detected