Files
powdr/executor
chriseth 81196aea3e Improve MutableState / Machines (#2130)
MutableState is the main way to get access to sub-machines during
witness generation. We used to create copies of MutableState for each
lookup, extracting the "current machine" where we need mutable access
and creating copies of references to the other machines. This causes an
allocation for each lookup (including fixed lookups, I think) which is
bad for performance.

This PR changes the approach to use RefCell instead: MutableState now
owns the machines and for each call to a machine, we mutably borrow that
machine. The RefCell mechanism ensures that there are no recursive calls
to machines and also avoids allocations.

I also changed the query callback to use non-mut references.

The first and third commits only move code around.
2024-11-22 17:28:03 +00:00
..