c0dearm / sharks

Fast, small and secure Shamir's Secret Sharing library crate
https://crates.io/crates/sharks
Other
59 stars 12 forks source link

Add Apple M1 arm as a benchmark #18

Closed film42 closed 3 years ago

film42 commented 3 years ago

I ran this a few times. There was some variance, but I thought it would be fun to add to the list. I had to update the test to run benchmarks. Looks like TryFrom is used for bytes -> Share now. This will likely change the benchmark results a little bit.

$ rustup run stable-aarch64-apple-darwin cargo bench
...
     Running target/release/deps/benchmarks-1987f996d8263afe
WARNING: HTML report generation will become a non-default optional feature in Criterion.rs 0.4.0.
This feature is being moved to cargo-criterion (https://github.com/bheisler/cargo-criterion) and will be optional in a future version of Criterion.rs. To silence this warning, either switch to cargo-criterion or enable the 'html_reports' feature in your Cargo.toml.

Gnuplot not found, using plotters backend
obtain_shares_dealer    time:   [3.3367 us 3.3629 us 3.4058 us]                                  
                        change: [-1.1755% -0.7403% -0.1788%] (p = 0.00 < 0.05)
                        Change within noise threshold.
Found 6 outliers among 100 measurements (6.00%)
  3 (3.00%) high mild
  3 (3.00%) high severe

step_shares_dealer      time:   [741.75 ps 742.65 ps 743.52 ps]                                
                        change: [+0.0632% +0.2513% +0.4350%] (p = 0.01 < 0.05)
                        Change within noise threshold.
Found 21 outliers among 100 measurements (21.00%)
  8 (8.00%) low severe
  1 (1.00%) low mild
  3 (3.00%) high mild
  9 (9.00%) high severe

recover_secret          time:   [210.14 us 210.23 us 210.34 us]                           
                        change: [-0.1244% +0.0138% +0.1448%] (p = 0.84 > 0.05)
                        No change in performance detected.
Found 13 outliers among 100 measurements (13.00%)
  6 (6.00%) high mild
  7 (7.00%) high severe

share_from_bytes        time:   [27.567 ns 27.602 ns 27.650 ns]                              
                        change: [-35.677% -35.523% -35.367%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 19 outliers among 100 measurements (19.00%)
  1 (1.00%) low severe
  2 (2.00%) low mild
  7 (7.00%) high mild
  9 (9.00%) high severe

share_to_bytes          time:   [26.716 ns 26.735 ns 26.755 ns]                            
                        change: [-22.009% -21.844% -21.685%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 15 outliers among 100 measurements (15.00%)
  3 (3.00%) low severe
  3 (3.00%) low mild
  2 (2.00%) high mild
  7 (7.00%) high severe