Skip to content
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

Closed
wants to merge 5 commits into from
Closed

Conversation

sirlensalot
Copy link
Contributor

No description provided.

@@ -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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Member

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

Copy link
Contributor Author

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)
Copy link
Member

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!

@fosskers fosskers added the component: contract-data Anything to do with the Coin Contract or Grant files. label Aug 13, 2019
@mightybyte
Copy link
Contributor

Closing for mainnet release, reopen later if still relevant.

@mightybyte mightybyte closed this Oct 30, 2019
@fosskers fosskers deleted the feat/benchmark-coincontract branch March 13, 2020 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: contract-data Anything to do with the Coin Contract or Grant files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants