aztec-packages icon indicating copy to clipboard operation
aztec-packages copied to clipboard

(optimization) avm: for lookups, only calculate inverses if count != 0

Open fcarreiro opened this issue 6 months ago • 0 comments

IIUC, right now we calculate the inverse for a lookup if the source or target selector is 1. Moreover, we set the target selector to be 1 for ALL the trace. However, I think we only need it if the source selector is 1 or if the target count is != 0.

In other words, we could either restrict the target selector to actual rows that we expect to be active, or change the GenericLookup/Perm relations to take this into account.

In any case, first give it more thought and see if it's (cryptographically) sound.

fcarreiro avatar Aug 19 '24 11:08 fcarreiro