You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 dag structure. Only the Root CMR and one CMR per disconnect node is needed, so perhaps there is a way to keep only these placing the CMR in a union in the dag structure only accessible to disconnect.
Move the TMR out of the type structure. 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_t values with uint32_t values. Ensure that the maximum index of arrays is less than 2^32.
Replace all unification_var* with a uint32_t value and rearrange the unification_var allocations so that they all are in one single array.
make an isChild field in unification_var instead of using a NULL pointer. Make the parent pointer part of a union.
The text was updated successfully, but these errors were encountered:
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.
dag
structure. Only the Root CMR and one CMR perdisconnect
node is needed, so perhaps there is a way to keep only these placing the CMR in a union in thedag
structure only accessible todisconnect
.type
structure. 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).size_t
values withuint32_t
values. Ensure that the maximum index of arrays is less than 2^32.unification_var*
with auint32_t
value and rearrange theunification_var
allocations so that they all are in one single array.isChild
field inunification_var
instead of using aNULL
pointer. Make the parent pointer part of a union.The text was updated successfully, but these errors were encountered: