Skip to content
Snippets Groups Projects
  1. Jul 12, 2024
    • STEVAN Antoine's avatar
      fix colors and markers for elliptic curves in plots (dragoon/komodo!157) · 8853e01b
      STEVAN Antoine authored
      ## results
      ![setup](/uploads/1f3a383689d3c8fd5a3f1331deabdec0/setup.png)
      ![commit](/uploads/bcf3bfdd991725abb97cbe4f8890840b/commit.png)
      ![inverse](/uploads/35316c887c6b2347baa86c4db119f762/inverse.png)
      ![mul](/uploads/262c27e99d7f2b5c8fb45761607a8717/mul.png)
      ![transpose](/uploads/2378460cb687d0a9320a24a840ed2eef/transpose.png)
      8853e01b
  2. Jul 05, 2024
    • STEVAN Antoine's avatar
      improve linalg benchmarks (!153) · 1395283f
      STEVAN Antoine authored
      this adds a new custom field to the `benchmarks::fields` new module and fixes the "linalg" commands to run the benchmarks
      
      ## results
      > :bulb: **Note**
      >
      > using the data from !156
      
      ![inverse](/uploads/9368bc1b23a8f8772a05b8c8bab85b96/inverse.png)
      ![mul](/uploads/62b9633f47360c01ffbc92fdf15afcbe/mul.png)
      ![transpose](/uploads/c6892261d27306037a0a2a614f93d584/transpose.png)
      1395283f
  3. May 28, 2024
    • STEVAN Antoine's avatar
      split `examples/` into `benchmarks/` and `bins/` (dragoon/komodo!117) · bb626120
      STEVAN Antoine authored
      ## new structure for the repository
      - benchmarks are in `./benchmarks/` and can be run with either `cargo run --package benchmarks --bin <bench>` or the commands in `./benchmarks/README.md`
      ```
      ├── Cargo.toml
      ├── README.md
      └── src
          └── bin
              ├── commit.rs
              ├── fec.rs
              ├── linalg.rs
              ├── operations
              │   ├── curve_group.rs
              │   └── field.rs
              ├── recoding.rs
              ├── setup.rs
              └── setup_size.rs
      ```
      
      - examples are now in `./bins/` as standalone binaries and can be run either with `cargo run --package <pkg>` or with the help of the `cargo bin` command from `.nushell/cargo.nu`
      ```
      ├── curves
      │   ├── Cargo.toml
      │   ├── README.md
      │   └── src
      │       └── main.rs
      ├── inbreeding
      │   ├── build.nu
      │   ├── Cargo.toml
      │   ├── consts.nu
      │   ├── mod.nu
      │   ├── plot.nu
      │   ├── README.md
      │   ├── run.nu
      │   └── src
      │       ├── environment.rs
      │       ├── main.rs
      │       └── strategy.rs
      ├── rank
      │   ├── Cargo.toml
      │   └── src
      │       └── main.rs
      └── rng
          ├── Cargo.toml
          └── src
              └── main.rs
      ```
      
      - Nushell modules are now located in `./.nushell/`
      
      ## changelog
      apart from the changes to the general structure of the repo:
      - `binary.nu` -> `.nushell/binary.nu`
      - new `cargo bin` command from `.nushell/cargo.nu`
      - `error throw` is now defined in `.nushell/error.nu`
      - main TOML has been greatly simplified because the dependencies of "examples" have been moved to the associated crates
      - the rest is basically the same but in the new structure
      bb626120
  4. May 23, 2024
    • STEVAN Antoine's avatar
      dont' hardcode curves in the benchmarks (dragoon/komodo!99) · d7e84161
      STEVAN Antoine authored
      up until now, elliptic curves have been hardcoded in the benchmarks, forcing to run them on all supported curves...
      
      this MR makes it possible to use only a subset of curves.
      
      > :bulb: **Note**  
      > when running the same commands from !104, minus the "inbreeding" ones which are not affected by this MR, the time goes from 12min 33sec to 4min 28sec :tada: 
      
      
      ## TODO
      - [x] setup
      - [x] commit
      - [x] recoding
      - [x] fec
      - [ ] linalg
      - [ ] setup size
      - [ ] field operations
      - [ ] group operations
      
      > :bulb: **Note**  
      > because all the unticked bullet points above are far from critical to the paper and do require to measure all curves, i won't change these for now
      d7e84161
    • STEVAN Antoine's avatar
      Refactor plot commands (dragoon/komodo!104) · 0f43be24
      STEVAN Antoine authored
      this MR moves run and plot commands from `examples/benches/README.md` to
      - `scripts/setup/`: `run.nu` and `plot.nu`
      - `scripts/commit/`: `run.nu` and `plot.nu`
      - `scripts/recoding/`: `run.nu` and `plot.nu`
      - `scripts/fec/`: `run.nu` and `plot.nu`
      - `scripts/inbreeding/`: `build.nu`, `run.nu` and `plot.nu`
      
      to generate all the figures at once
      ```bash
      use scripts/setup/run.nu; seq 0 13 | each { 2 ** $in } | run --output data/setup.ndjson
      use ./scripts/setup/plot.nu; plot data/setup.ndjson --save ~/setup.pdf
      
      use scripts/commit/run.nu; seq 0 13 | each { 2 ** $in } | run --output data/commit.ndjson
      use ./scripts/commit/plot.nu; plot data/commit.ndjson --save ~/commit.pdf
      
      use scripts/recoding/run.nu; seq 0 18 | each { 512 * 2 ** $in } | run --ks [2, 4, 8, 16] --output data/recoding.ndjson
      use ./scripts/recoding/plot.nu; plot data/recoding.ndjson --save ~/recoding.pdf
      
      use scripts/fec/run.nu; seq 0 18 | each { 512 * 2 ** $in } | run --ks [2, 4, 8, 16] --output data/fec.ndjson
      use ./scripts/fec/plot.nu; plot encoding data/fec.ndjson --save ~/encoding.pdf
      use ./scripts/fec/plot.nu; plot decoding data/fec.ndjson --save ~/decoding.pdf
      use ./scripts/fec/plot.nu; plot e2e data/fec.ndjson --save ~/e2e.pdf
      
      use ./scripts/fec/plot.nu; plot combined data/fec.ndjson --recoding data/recoding.ndjson --save ~/comparison.pdf
      use ./scripts/fec/plot.nu; plot ratio data/fec.ndjson --recoding data/recoding.ndjson --save ~/ratio.pdf
      
      ./scripts/inbreeding/build.nu
      ./scripts/inbreeding/run.nu --output data/inbreeding.nuon
      ./scripts/inbreeding/plot.nu data/inbreeding.nuon --save ~/inbreeding.pdf
      ```
      
      > :bulb: **Note**  
      > this took around 27min 18sec in total on my machine with 14min 45sec for the inbreeding section only and 12min 33sec for the rest
      0f43be24
  5. May 21, 2024
  6. May 13, 2024
    • STEVAN Antoine's avatar
      make figures better (dragoon/komodo!98) · b4e53ac6
      STEVAN Antoine authored
      this MR makes the plot a bit nicer.
      
      ## new figures
      ![setup](/uploads/e6a7ac4e7460d8ff7015906216f9d30b/setup.png)
      ![commit](/uploads/a40700913594771cefeba45a44b2370b/commit.png)
      ![recoding](/uploads/1f3e86763c897dcf034e4b01ba858ada/recoding.png)
      ![decoding](/uploads/dd703ba4af59b4043ae5bb966f8b55ae/decoding.png)
      ![encoding](/uploads/6dbc077bbfe8086357074a0e18c8b530/encoding.png)
      ![e2e](/uploads/9eb92dbb8dc013ef803bde70f3e04f02/e2e.png)
      ![inbreeding](/uploads/9f7dac6a48c24e97448e92a69a506d2f/inbreeding.png)
      b4e53ac6
  7. Apr 29, 2024
  8. Apr 26, 2024
    • STEVAN Antoine's avatar
      add a "fec" bench (dragoon/komodo!93) · 392f640a
      STEVAN Antoine authored
      this MR adds
      - `examples/benches/bench_fec.rs` to the list of example benches
      - instructions on how to run the new benchmark and plot the results
      
      ## results
      ![encoding](/uploads/d474aa6f39ea20c6b346fb17d2e7ecdc/encoding.png)
      ![decoding](/uploads/061944e49f02541ea93ac0de9547ce37/decoding.png)
      ![e2e](/uploads/bb27f4bb6290c4697a65faa59a0ac4e0/e2e.png)
      392f640a
    • STEVAN Antoine's avatar
      add some minor fixes around the benches (dragoon/komodo!92) · 89c6377d
      STEVAN Antoine authored
      - fix the path to the "bench" readme and remove it from the plot scripts
      - "BLS-12-381" to "BLS12-381" for consistency
      89c6377d
    • STEVAN Antoine's avatar
      use better names in `plot.py` (dragoon/komodo!91) · 2e6398e8
      STEVAN Antoine authored
      this MR goes from
      ```rust
      let xs = seq 0 5 | each { 2 ** $in } | wrap x
      let twice = $xs | insert measurement { 2 * $in.x } | insert error { 0.1 + 0.5 * $in.x }
      let square = $xs | insert measurement { $in.x ** 2 } | insert error { 1 + 1.5 * $in.x }
      
      python scripts/plot/plot.py --title title --x-label x --y-label y --fullscreen ([
          { group: "x ^ 2", items: $square },
          { group: "2 * x", items: $twice }
      ] | to json)
      ```
      to
      ```rust
      let xs = seq 0 5 | each { 2 ** $in }
      let twice = $xs | wrap x | insert y { 2 * $in.x } | insert e { 0.1 + 0.5 * $in.x }
      let square = $xs | wrap x | insert y { $in.x ** 2 } | insert e { 1 + 1.5 * $in.x }
      
      python scripts/plot/plot.py --title title --x-label x --y-label y --fullscreen ([
          { name: "x ^ 2", points: $square },
          { name: "2 * x", points: $twice }
      ] | to json)
      ```
      updates the "bench" README and adds type annotations to the `plot.py` script.
      2e6398e8
    • STEVAN Antoine's avatar
      migrate recoding benchmark to PLNK (dragoon/komodo!89) · 22f7943d
      STEVAN Antoine authored
      this MR
      - moves the last "recoding" benchmark to `examples/benches/`
      - moves the README, which is now all alone, to `examples/benches/`
      - adds a mention to `examples/benches/README.md` in `README.md`
      - some minor improvements to the bench README
      
      ## TODO
      - [x] find a way to plot the "recoding" results (thanks to !90)
      22f7943d
  9. Apr 25, 2024
    • STEVAN Antoine's avatar
      make plot scripts more powerful and minor tweaks (dragoon/komodo!88) · 72f3cd8a
      STEVAN Antoine authored
      ## changelog
      - use `out> *.ndjson` in the README to simplify running the benchmarks
      - create a `scripts/math.nu` module with `ns-to-ms` and `compute-stats` to refactor some of the most common operations
      - add `--fullscreen` to `plot.py` and `multi_bar.py`
      - add `--x-scale` and `--y-scale` to `plot.py`
      72f3cd8a
    • STEVAN Antoine's avatar
      migrate criterion benchmarks to PLNK (dragoon/komodo!87) · eaa8acbd
      STEVAN Antoine authored
      ## changelog
      - benchmarks
        - _commit_ has been removed in favor of `examples/benches/commit.rs`
        - _linalg_ has been migrated to `examples/benches/` as `bench_linalg`
        - _setup_ has been migrated to `examples/benches/` as `bench_setup`
      - `read-atomic-ops` command has been moved to `scripts/parse.nu` module
      - `scripts/plot/bench_commit.py` has been made more general and renamed to `scripts/plot/plot.py`
      - `scripts/plot/benches.py` has been removed because it's not required anymore => `plot.py` and `multi_bar.py` are general enough
      eaa8acbd
    • STEVAN Antoine's avatar
      bump PLNK to 0.6.0 (dragoon/komodo!85) · 4b193d97
      STEVAN Antoine authored
      this MR
      - bumps PLNK to 0.6.0
      - update all existing code
      - uses the PLNK lib in `examples/benches/commit.rs`
      - fixes the y label of the plot in `scripts/plot/bench_commit.py`: was _ns_, should be _ms_
      4b193d97
  10. Apr 24, 2024
  11. Apr 23, 2024
  12. Apr 22, 2024
    • STEVAN Antoine's avatar
      improve the _atomic_ benchmark plots (dragoon/komodo!79) · ed16b5d8
      STEVAN Antoine authored
      this MR improves the "_atomic_" script in `benches/README.md` to allow filtering _species_ to show in the _multibar_ plot.
      
      in addition to this, the warmup time and the number of samples of Criterion have been increased back to 3sec and 100 respectively.
      
      > **Note**  
      > the benchmarks take 15min on my machine, i.e. by running the following two commands in Nushell
      > ```bash
      > cargo criterion --output-format verbose --message-format json --bench field_operations out> field.ndjson
      > cargo criterion --output-format verbose --message-format json --bench curve_group_operations out> curve.ndjson
      > ```
      
      ## results
      ![foo](/uploads/5cdc5af344f4ad0510b3d1993c09389f/foo.png)
      ![bar](/uploads/2563b465727d85b886f77c5574ae616d/bar.png)
      ![baz](/uploads/7a485c61d218c8e065afdd880171a12b/baz.png)
      ed16b5d8
    • STEVAN Antoine's avatar
      measure atomic operations of curve groups and prime fields (dragoon/komodo!78) · 4dcfdfb0
      STEVAN Antoine authored
      this MR adds two now benchmarks:
      - `field_operations` in `benches/operations/field.rs`
      - `curve_group_operations` in `benches/operations/curve_group.rs`
      
      as well as `scripts/plot/multi_bar.py` to plot the results, see `benches/README.md` for the commands to run.
      
      ## results
      ![curve_group](/uploads/0a27dcdc7965090b0429867e1822a40c/curve_group.png)
      
      ![field](/uploads/461455568a0a637f78f9c2b6d1a68f59/field.png)
      4dcfdfb0
  13. Apr 12, 2024
  14. Apr 10, 2024
  15. Apr 02, 2024
    • STEVAN Antoine's avatar
      add a benchmark for the _trusted setup_ (dragoon/komodo!52) · 4273d869
      STEVAN Antoine authored
      as per title
      
      ## changelog
      - add a `setup.rs` benchmark which measures
        - the creation of a random setup
        - the serialization of a setup
        - the deserialization of a setup
      - refactor `plot.py` a bit to
        - use `argparse`
        - take `--bench` to plot either _linalg_ or _setup_ results
        - write a complete `plot_setup` function
        - add a bit of documentation here and there
      
      ## example results
      ![Figure_1](/uploads/ea4bddc5c0c426d0824bad55e2e2e5aa/Figure_1.png)
      4273d869
  16. Mar 26, 2024
    • STEVAN Antoine's avatar
      benchmark the `linalg` module (dragoon/komodo!43) · 5d1cb661
      STEVAN Antoine authored
      this MR
      - adds `criterion` as a dependency
      - creates a `linalg.rs` benchmark file
      - makes the following function `pub`lic
        - `Matrix::transpose`
        - `Matrix::invert`
        - `Matrix::mul`
      - creates a new `benches/` directory containing
        - a README with commands
        - a `plot.py` file to plot results
        - a `linalg.rs` file with the benchmarks
      
      ## example results
      ![Figure_1](/uploads/f352a6f411662361fa9ca381710271d5/Figure_1.png)
      5d1cb661