-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Benchmark coin contract #322
Conversation
@@ -456,6 +461,9 @@ initCapabilities :: [Capability] -> EvalState | |||
initCapabilities cs = set (evalCapabilities . capGranted) cs def | |||
{-# INLINABLE initCapabilities #-} | |||
|
|||
initModules :: ModuleCache -> EvalState -> EvalState | |||
initModules mcache = set (evalRefs . rsLoadedModules) mcache | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can INLINABLE
this call, as well. There's no harm in inlining this as a pure function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're pretty close to having nice benchmarks for these functions so I'd probably wait in order to avoid knee-jerk inlining ...
|
||
``` | ||
benchmarking pact-backend/coin-cp/transfer | ||
time 97.43 μs (97.25 μs .. 97.68 μs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a very significant speedup. Caching is important!
Closing for mainnet release, reopen later if still relevant. |
No description provided.