IntersectMBO / IntersectMBO/plutus

`mapData` is more expensive than it needs to be

Open
#7,508 0 comments 0 reactions 0 assignees View on GitHub
Costing Internal status: triaged
Dominant language
Haskell
Stars
1.6k
Forks
508
Avg merge
3d 10h
Merged PRs (30d)
22

Description

`mapData` is currently 2x more CPU-expensive than `listData`:

```JSON
"listData": {
"cpu": {
"arguments": 33852,
"type": "constant_cost"
},
"memory": <...>
},
"mapData": {
"cpu": {
"arguments": 68246,
"type": "constant_cost"
},
"memory": <...>
},
```

While it is genuinely slower than `listData`, perhaps not by as much. I believe the reason why the numbers are the way they are is that `geq` used to be really slow for `mapData` but not for `listData`. This was fixed in #7323, so you should recost `mapData`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.