From 4f69a1d6c70e56e60517d55a85f87e08caa6ccdb Mon Sep 17 00:00:00 2001 From: "a.stevan" <antoine.stevan@isae-supaero.fr> Date: Fri, 31 Jan 2025 11:04:35 +0100 Subject: [PATCH] fix "atomic operations" --- benchmarks/README.md | 10 +++++++ benchmarks/mod.nu | 30 ++++++++++++------- .../src/bin/{operations => }/curve_group.rs | 0 benchmarks/src/bin/{operations => }/field.rs | 0 4 files changed, 30 insertions(+), 10 deletions(-) rename benchmarks/src/bin/{operations => }/curve_group.rs (100%) rename benchmarks/src/bin/{operations => }/field.rs (100%) diff --git a/benchmarks/README.md b/benchmarks/README.md index 0cc8484c..dbaba968 100644 --- a/benchmarks/README.md +++ b/benchmarks/README.md @@ -117,6 +117,16 @@ let benchmarks = { ffs: ["fp128", "bls12-381"], output: "fri.ndjson", }, + field: { + enabled: true, + nb_measurements: 1000, + output: "field.ndjson", + }, + curve_group: { + enabled: true, + nb_measurements: 1000, + output: "curve_group.ndjson", + }, } ``` diff --git a/benchmarks/mod.nu b/benchmarks/mod.nu index cec02143..559ce8f3 100644 --- a/benchmarks/mod.nu +++ b/benchmarks/mod.nu @@ -85,6 +85,8 @@ export def main [ ffs: list<string>, output: string, >, + field: record<enabled: bool, nb_measurements: int, output: string>, + curve_group: record<enabled: bool, nb_measurements: int, output: string>, >, --output-dir: path = ".", ] { @@ -122,6 +124,24 @@ export def main [ --folding-factors $it.ns ) | to ndjson out> $it.output }} + | insert field.run {{ |it| + cargo run ...[ + --bin field + --release + --package benchmarks + -- + --nb-measurements $it.nb_measurements + ] out>> ($target | path join $it.output) + }} + | insert curve_group.run {{ |it| + cargo run ...[ + --bin curve_group + --release + --package benchmarks + -- + --nb-measurements $it.nb_measurements + ] out>> ($target | path join $it.output) + }} let _ = $benchmarks | items { |k, b| if ($b.enabled? | default true) { @@ -131,14 +151,4 @@ export def main [ log warning $"skipping (ansi cyan)($k)(ansi reset)" } } - - # const OPTIONS = [ - # --release - # --package benchmarks - # -- - # --nb-measurements 1000 - # ] - # cargo run --bin field_operations ...$OPTIONS out> ($target | path join field.ndjson) - # cargo run --bin curve_group_operations ...$OPTIONS out> ($target | path join curve_group.ndjson) } - diff --git a/benchmarks/src/bin/operations/curve_group.rs b/benchmarks/src/bin/curve_group.rs similarity index 100% rename from benchmarks/src/bin/operations/curve_group.rs rename to benchmarks/src/bin/curve_group.rs diff --git a/benchmarks/src/bin/operations/field.rs b/benchmarks/src/bin/field.rs similarity index 100% rename from benchmarks/src/bin/operations/field.rs rename to benchmarks/src/bin/field.rs -- GitLab