Implement resolc end-to-end compilation benchmarks (#406)

# Description

Closes [#403](https://github.com/paritytech/revive/issues/403)

Adds compilation time benchmarks for resolc end-to-end.

The benchmarks can be run from the root via:

```sh
make bench-resolc
```

HTML reports will be generated under `target/criterion`, and a summary
of the results at
[crates/resolc/BENCHMARKS_M4PRO.md](https://github.com/paritytech/revive/blob/lj/compilation-benchmarks/crates/resolc/BENCHMARKS_M4PRO.md)
(currently from running on a Mac M4 Pro).
This commit is contained in:
LJ
2025-11-19 12:16:07 +01:00
committed by GitHub
parent e78f3cc419
commit ad61b6e3c9
24 changed files with 668 additions and 193 deletions
+2 -3
View File
@@ -4,7 +4,7 @@
- [Benchmark Results](#benchmark-results)
- [Baseline](#baseline)
- [OddPorduct](#oddporduct)
- [OddProduct](#oddproduct)
- [TriangleNumber](#trianglenumber)
- [FibonacciRecursive](#fibonaccirecursive)
- [FibonacciIterative](#fibonacciiterative)
@@ -19,7 +19,7 @@
|:--------|:-------------------------|:-------------------------------- |
| **`0`** | `10.08 us` (✅ **1.00x**) | `10.32 us` (✅ **1.02x slower**) |
### OddPorduct
### OddProduct
| | `EVM` | `PVMInterpreter` |
|:-------------|:--------------------------|:-------------------------------- |
@@ -70,4 +70,3 @@
---
Made with [criterion-table](https://github.com/nu11ptr/criterion-table)
+1 -1
View File
@@ -57,7 +57,7 @@ fn bench_baseline(c: &mut Criterion) {
}
fn bench_odd_product(c: &mut Criterion) {
let group = group(c, "OddPorduct");
let group = group(c, "OddProduct");
let parameters = &[10_000, 100_000, 300000];
bench(group, parameters, parameters, Contract::odd_product);