-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Description
Recent analysis shows that during Simplicity execution, peek memory use could be as high as 720 bytes per DAG node. We should rearrange computations and allocations to try to reduce that as much as possible. Ideally I'd like to see less than 128 bytes per DAG node if possible.
- Postpone the CMR computation until after type inference, and move the CMR out of the
dagstructure. Only the Root CMR and one CMR perdisconnectnode is needed, so perhaps there is a way to keep only these placing the CMR in a union in thedagstructure only accessible todisconnect. - Move the TMR out of the
typestructure. Compute it as part of the IMR computation and free it afterwards. (The IMR calculation seems to require up to 4*32 bytes per DAG node to just by itself, so keeping peek memory use under 128 bytes per DAG node seems impossible). - Replace all
size_tvalues withuint32_tvalues. Ensure that the maximum index of arrays is less than 2^32. - Replace all
unification_var*with auint32_tvalue and rearrange theunification_varallocations so that they all are in one single array. - make an
isChildfield inunification_varinstead of using aNULLpointer. Make the parent pointer part of a union.
Metadata
Metadata
Assignees
Labels
No labels