near / wasmtime

Standalone JIT-style runtime for WebAssembly, using Cranelift
https://wasmtime.dev/
Apache License 2.0
3 stars 4 forks source link

Track number of ZK ASM counters for tests and benchmarks #107

Closed akashin closed 7 months ago

akashin commented 7 months ago

The main performance metric that we are optimizing is the number of ZK ASM Counters used during execution. These correspond to the total number of steps that the program execution took as well as usage of specialized circuits for Binary, Arithmetic and Hashing operations.

We need to start tracking the number of counters for all tests and benchmarks that we run to be able to effectively do performance optimization and track any regressions.

One way to do this would be to extend the file tracking test success rate https://github.com/near/wasmtime/blob/main/cranelift/codegen/src/isa/zkasm/docs/state.csv with another column with the number of counters consumed.

akashin commented 7 months ago

This is now implemented - performance counters are tracked in the "Cycles" column of https://github.com/near/wasmtime/blob/main/docs/zkasm/test_summary.csv.