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

Improved benchmarking infrastructure (do not merge) #1964

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

webmaster128
Copy link
Member

This makes a bunch of improvements to the benchmarking of cosmwasm-vm, such as running all cache tests with two different contracts as well as upgrading criterion.

It also adds a benchmark to a contract project in which it compared the Wasm performance to the native performance for some compute heavy operations: argon3 and BLS12-318 signature verification. This part is a bit problematic since the schema generator and the benchmarking create compiler isssues together.

A few first results is that for the chosen benchmarks, the Wasm runs 10x-20x slower than native for the given tasks. A reason might be simd optimizations on native or assembly optimizations. More tasks will be needed. The other observation is that wasm-opt can produce results that execute up to 24% faster by using -O4 instead of -Os.

wasm-opt args Drand verify G1 Drand verify G2
before wasm-opt 35.875 ms 29.642 ms
-Os 37.978 ms 30.900 ms
-O2 32.990 ms 27.200 ms
-O4 28.871 ms 24.081 ms

@webmaster128 webmaster128 changed the title Improved benchmrking infrastructure (do not merge) Improved benchmarking infrastructure (do not merge) Nov 27, 2023
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

1 participant