Open plafer opened 1 month ago
To clarify, is the issue here that we could optimize things a bit more by not filling the hasher chiplet with rows to compute hash of of zeros?
Exactly. We will basically save 8 hasher chiplet rows per DYN
(and 1 main trace row from not having a corresponding END
)
Also, I believe DYN
could be made an operation that is included in basic blocks then?
In #1091, we need the decoder helper registers to save the word loaded from memory (for the chiplets bus and block hash table). However, technically, since DYN
is currently a control block, we shouldn't be using its helper registers.
Exactly. We will basically save 8 hasher chiplet rows per
DYN
(and 1 main trace row from not having a correspondingEND
)
Makes sense. One other thing we can try to do in the future is to use multiplicities somehow in the hasher chiplet so that we would not need to have a trace for computing the same hash more than once.
I believe
DYN
could be made an operation that is included in basic blocks then?
This would be tricky as basic blocks don't have children and DYN
could invoke an arbitrary block (e..g, a JOIN
block). So, we'd need to end the current basic block, then execute the dynamic block, and then execute the rest basic block - but this would be basically the same thing as having DYN
be its own node (i.e., not in basic block).
_Originally posted by @plafer in https://github.com/0xPolygonMiden/miden-vm/pull/1516#discussion_r1781552482_