Skip to content
Snippets Groups Projects

dont' hardcode curves in the benchmarks

Merged STEVAN Antoine requested to merge fix-hardcoded-curve-benchmarks into main
1 file
+ 45
55
Compare changes
  • Side-by-side
  • Inline
+ 45
55
@@ -85,36 +85,31 @@ cargo run --release --example bench_setup -- ...[
] out> setup.ndjson
```
```nushell
gplt plot ...[
# --title "time to create trusted setups for certain curves"
--x-label "degree"
--y-label "time (in ms)"
(
open setup.ndjson
| ns-to-ms $.times
| compute-stats $.times
| insert degree { get label | parse "degree {d}" | into record | get d | into int}
| update name {|it| if ($it.name | str starts-with "ARK") {
let c = $it.name | parse "ARK setup on {curve}" | into record | get curve
$"($c)-ark"
} else {
$it.name | parse "setup on {curve}" | into record | get curve
}}
| rename --column { degree: "x", mean: "y", stddev: "e" }
| select name x y e
| group-by name --to-table
| reject items.name
| rename --column { group: "name", items: "points" }
| sort-by name
| to json
)
--fullscreen
--dpi 150
--fig-size ...[16, 9]
--font ({ size: 30, family: serif, sans-serif: Helvetica } | to json)
--use-tex
# --save setup.pdf
]
open setup.ndjson
| ns-to-ms $.times
| compute-stats $.times
| insert degree { get label | parse "degree {d}" | into record | get d | into int}
| update name {|it| if ($it.name | str starts-with "ARK") {
let c = $it.name | parse "ARK setup on {curve}" | into record | get curve
$"($c)-ark"
} else {
$it.name | parse "setup on {curve}" | into record | get curve
}}
| rename --column { degree: "x", mean: "y", stddev: "e" }
| select name x y e
| group-by name --to-table
| reject items.name
| rename --column { group: "name", items: "points" }
| sort-by name
| gplt plot ...[
# --title "time to create trusted setups for certain curves"
--x-label "degree"
--y-label "time (in ms)"
($in | to json)
...($in.points | flatten | into-axis-options -x "plain" -y "duration")
...$COMMON_OPTIONS
# --save setup.pdf
]
```
## commit
@@ -127,31 +122,26 @@ cargo run --release --example bench_commit -- ...[
] out> commit.ndjson
```
```nushell
gplt plot ...[
# --title "time to commit polynomials for certain curves"
--x-label "degree"
--y-label "time (in ms)"
(
open commit.ndjson
| where name !~ '^SEC'
| ns-to-ms $.times
| compute-stats $.times
| insert degree { get label | parse "degree {d}" | into record | get d | into int }
| rename --column { degree: "x", mean: "y", stddev: "e" }
| select name x y e
| group-by name --to-table
| reject items.name
| rename --column { group: "name", items: "points" }
| sort-by name
| to json
)
--fullscreen
--dpi 150
--fig-size ...[16, 9]
--font ({ size: 30, family: serif, sans-serif: Helvetica } | to json)
--use-tex
# --save commit.pdf
]
open commit.ndjson
| where name !~ '^SEC'
| ns-to-ms $.times
| compute-stats $.times
| insert degree { get label | parse "degree {d}" | into record | get d | into int }
| rename --column { degree: "x", mean: "y", stddev: "e" }
| select name x y e
| group-by name --to-table
| reject items.name
| rename --column { group: "name", items: "points" }
| sort-by name
| gplt plot ...[
# --title "time to commit polynomials for certain curves"
--x-label "degree"
--y-label "time (in ms)"
($in | to json)
...($in.points | flatten | into-axis-options -x "plain" -y "duration")
...$COMMON_OPTIONS
# --save commit.pdf
]
```
## end-to-end benchmarks
Loading