IntersectMBO / IntersectMBO/plutus

Investigate call-by-need semantics for `force`-`delay`

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

Description

Currently the following UPLC pseudocode:

```
let y = delay e
in f (\_ -> force y) + g (\_ -> force y)
```

will evaluate `e` twice if both `f` and `g` evaluate `force y` once.

If we used some sort of call-by-need semantics specifically for `delay` and `force`, `e` would only be evaluated twice.

This is worth investigating, I believe.

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.