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

cw1-whitelist-ng: Benchmarking #534

Closed
wants to merge 1 commit into from
Closed

cw1-whitelist-ng: Benchmarking #534

wants to merge 1 commit into from

Conversation

hashedone
Copy link
Contributor

Addresses #505

This is not finished proper benchmark, but rather POC for verifying gas usage regression with ng. Created tests uses the optimized binaries which has to be generated to use them. To make it work I needed to create "fork" of cosmwasm-std which doesn't perform message parsing (so it is delayed to contract). It is not changing behaviour of anything in stdlib, it just adds possibility to bypass message deserialization. In final ng contracts it would not be needed, as entry points would be generated for the contracts from scratch.

Unfortunately tests went bad for ng. Gas usages for cw1-whitelist are:

Instantiation gas usage: 5480850233
Execution gas usage: 10734450010

For cw1-whitelist-ng results are:

Instantiation gas usage: 5939100233
Execution gas usage: 13134000010

Instantiation regression is not-so-bad (~8%), considering it is one-time thing, and probably can be improved with some tweaking, but the regression of execution worries me a lot (over 20% if I am not mistaken). However I have strong suspicions what causes that and how to improve that, so it might be way better. However this shows, that before any further work on ng is done, performance should be addressed.

@hashedone hashedone marked this pull request as draft November 8, 2021 10:34
@ueco-jb
Copy link
Member

ueco-jb commented Jul 8, 2022

NG works continues on different branches anyway.

@ueco-jb ueco-jb closed this Jul 8, 2022
@ueco-jb ueco-jb deleted the 505-ng-bench branch August 30, 2022 13:49
@ueco-jb ueco-jb restored the 505-ng-bench branch August 30, 2022 13:50
@ueco-jb ueco-jb deleted the 505-ng-bench branch August 30, 2022 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants