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
Every time we make a call using Executor we create a new Evm. This creates the context, handlers, and instruction table, which then also have to be cleaned up after the call is done.
This is relatively inexpensive in a normal test/fuzz test which consumes hundreds of thousands of gas. However, for very short calls which consume very little gas, like in invariants, the time spent in Evm initialization and destruction is often most of the time spent in that entire call (>50%).
We can avoid this by caching the evm / instruction table / handlers. There are currently a few complications, including missing Clone, Send and Sync for some of these types.
Additional context
No response
The text was updated successfully, but these errors were encountered:
Component
Other (please describe)
Describe the feature you would like
Every time we make a call using
Executor
we create a newEvm
. This creates the context, handlers, and instruction table, which then also have to be cleaned up after the call is done.This is relatively inexpensive in a normal test/fuzz test which consumes hundreds of thousands of gas. However, for very short calls which consume very little gas, like in invariants, the time spent in Evm initialization and destruction is often most of the time spent in that entire call (>50%).
We can avoid this by caching the evm / instruction table / handlers. There are currently a few complications, including missing
Clone
,Send
andSync
for some of these types.Additional context
No response
The text was updated successfully, but these errors were encountered: