Skip to content
Snippets Groups Projects

migrate criterion benchmarks to PLNK

Merged STEVAN Antoine requested to merge migrate-criterion-benchmarks-to-plnk into main
1 file
+ 61
0
Compare changes
  • Side-by-side
  • Inline
+ 61
0
@@ -52,6 +52,67 @@ python scripts/plot/multi_bar.py --title "complex curve group operations" -l "ti
)
```
## linear algebra
```nushell
let sizes = seq 0 10 | each { 2 ** $in }
cargo run --example bench_linalg -- --nb-measurements 10 ...$sizes
| lines
| each { from json }
| to ndjson # NOTE: see https://github.com/nushell/nushell/issues/12655
| save --force linalg.ndjson
```
```nushell
let linalg = open linalg.ndjson
| update times { each { $in / 1_000_000 } }
| insert mean {|it| $it.times | math avg}
| insert stddev {|it| $it.times | into float | math stddev}
| update label { parse "{op} {n}"}
| flatten --all label
| into int n
python scripts/plot/plot.py ...[
--title "time to inverse an nxn matrix on certain curves"
--x-label "size"
--y-label "time (in ms)"
(
$linalg
| where op == inverse
| rename --column { n: "x", name: "curve", mean: "measurement", stddev: "error" }
| group-by curve --to-table
| update items { reject curve }
| to json
)
]
python scripts/plot/plot.py ...[
--title "time to transpose an nxn matrix on certain curves"
--x-label "size"
--y-label "time (in ms)"
(
$linalg
| where op == transpose
| rename --column { n: "x", name: "curve", mean: "measurement", stddev: "error" }
| group-by curve --to-table
| update items { reject curve }
| to json
)
]
python scripts/plot/plot.py ...[
--title "time to multiply two nxn matrices on certain curves"
--x-label "size"
--y-label "time (in ms)"
(
$linalg
| where op == mul
| rename --column { n: "x", name: "curve", mean: "measurement", stddev: "error" }
| group-by curve --to-table
| update items { reject curve }
| to json
)
]
```
## oneshot benchmarks
these are benchmarks that run a single measurement, implemented as _examples_ in
`examples/benches/`.
Loading