Skip to content
Snippets Groups Projects

migrate criterion benchmarks to PLNK

Merged STEVAN Antoine requested to merge migrate-criterion-benchmarks-to-plnk into main
Files
2
+ 5
25
## run the benchmarks
```shell
nushell> cargo criterion --output-format verbose --message-format json out> results.ndjson
```
## add the _trusted setup_ sizes
```shell
nushell> cargo run --example bench_setup_size out>> results.ndjson
```
## plot the results
```shell
python scripts/plot/benches.py results.ndjson --bench linalg
python scripts/plot/benches.py results.ndjson --bench setup
```
## atomic operations
```nushell
cargo run --example bench_field_operations -- --nb-measurements 1000
@@ -70,7 +54,7 @@ let linalg = open linalg.ndjson
| flatten --all label
| into int n
for it in [
for graph in [
[op, title];
["inverse", "time to inverse an nxn matrix on certain curves"],
@@ -78,12 +62,12 @@ for it in [
["mul", "time to multiply two nxn matrices on certain curves"]
] {
python scripts/plot/plot.py ...[
--title $it.title
--title $graph.title
--x-label "size"
--y-label "time (in ms)"
(
$linalg
| where op == $it.op
| where op == $graph.op
| rename --column { n: "x", name: "curve", mean: "measurement", stddev: "error" }
| group-by curve --to-table
| update items { reject curve }
@@ -93,11 +77,7 @@ for it in [
}
```
## oneshot benchmarks
these are benchmarks that run a single measurement, implemented as _examples_ in
`examples/benches/`.
### trusted setup
## trusted setup
```nushell
let degrees = seq 0 13 | each { 2 ** $in }
cargo run --example bench_setup -- --nb-measurements 10 ...$degrees
@@ -131,7 +111,7 @@ python scripts/plot/plot.py ...[
]
```
### commit
## commit
```nushell
let degrees = seq 0 15 | each { 2 ** $in }
cargo run --example bench_commit -- --nb-measurements 10 ...$degrees
Loading