Conversation
Adding {-# INLINE getOp #-} enables GHC's case-of-case transformation,
eliminating the intermediate GenericOp constructor allocation in opcode
dispatch. This also lets GHC sink expensive thunks (contract lookups,
fee schedule fields) into only the opcode branches that use them.
Add doBenchmark = true to shellFor so that benchmark dependencies (tasty-bench) are available in nix develop without cabal update. Replace deprecated testTarget with testTargets.
msooseth
left a comment
There was a problem hiding this comment.
In general, I'm OK with such optimizations in case they benefit Echidna speed. Symbolic execution speed is mostly governed by SMT solver speed, so as long as this works for you, I'm good with it. However, it'd be nice to post a bench measurement test to the text of the PR so when we wanna understand things in the future, we can look it up.
| DAPP_SOLC = "${solc}/bin/solc"; | ||
| })) | ||
| [ | ||
| (hlib.compose.overrideCabal (old: { testTarget = "test"; })) |
There was a problem hiding this comment.
Is this related? Should it be here?
There was a problem hiding this comment.
Not really, but I've been getting a deprecation warning about that for a while now, so I just fixed that in fb3bfe4 while I was there.
There was a problem hiding this comment.
I... really don't understand nix. What is this thing doing? I guess it defines that the test is and then eventually it will be run? Are you sure this is not accidentally disabling tests? Sorry, this is really arcane stuff.
Description
This PR inlines getOp. I see a measurable speed improvement with this change locally. The optimization was suggested by Claude Code.
Checklist