-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Easy way to delay & cache computed atom fields #6134
Comments
This was referenced Mar 29, 2023
2 tasks
3 tasks
3 tasks
mergify bot
pushed a commit
that referenced
this issue
Apr 5, 2023
Implements #6134. # Important Notes One can define lazy atom fields as: ```haskell type Lazy Value ~x ~y ``` the evaluation of the `x` and `y` fields is then delayed until they are needed. The evaluation happens once. Then the computed value is kept in the atom for further use.
github-project-automation
bot
moved this from 🔧 Implementation
to 🟢 Accepted
in Issues Board
Apr 5, 2023
Jaroslav Tulach reports a new STANDUP for yesterday (2023-04-05): Progress: - lazy atom fields integrated: #6151
Next Day: Consolidate Array & Vector
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
#6073 as well as #5085 are in need of efficient, properly implemented lazy atom fields. The engine is in the best position to deliver it. The alternative is to create a
Lazy
type in the libraries, but that's a hacky and ugly solution. There should be noLazy
type in the libraries, but the support shall come from the engine:~
in front of the atom fieldLibrary guys would be delighted - #6073 (comment) - to get " a more efficient engine solution - I will be really happy to have it replaced. The benefits sound cool."
Initial investigation tried to evaluate following program:
to my biggest surprise it:
~
is acceptable value for constructor arguments~x
and~y
fields alreadyE.g. what we need to do is to make sure each such
~
field is computed just once.Tasks:
Atom
but obtain them like normal valuesIR
phases to allow~
inAtom
constructorsAtom
benchmarks are affected by this changeAtom
s with "lazy values" - it shall show there is some overhead of using laziness compared to strictAtom
valuesThe text was updated successfully, but these errors were encountered: