powdr-labs / powdr

A modular stack for zkVMs, with a focus on productivity, security and performance.
Apache License 2.0
416 stars 82 forks source link

Improve fixed lookup #2058

Closed chriseth closed 2 weeks ago

chriseth commented 2 weeks ago

The change from storing just the row to storing the row values changes the time reported for the fixed machine on the keccak example from 1.5s to 1.2 seconds.

The pc lookup plus copying the values from the columns took 3700 ns, now the lookup takes 500 ns.

Using a hash map takes it down to 1 second.

Current numbers:

460 ns: Evaluating LHS
621 ns: Splitting into known and unknown values
201 ns: Actual index lookup
1182 ns: creating the EvalValue result

Note that the "1.5 to 1.0 seconds" overall speed improvement includes the time it takes to build the lookup table.

leonardoalt commented 2 weeks ago

conflicts