Add Apple M1 arm as a benchmark (#18)
This commit is contained in:
parent
b1e7a5b1e1
commit
1f86cadf23
|
@ -58,6 +58,7 @@ You can run them with `cargo test` and `cargo bench`.
|
||||||
| ----------------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- |
|
| ----------------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- |
|
||||||
| Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz | [1.4321 us 1.4339 us 1.4357 us] | [1.3385 ns 1.3456 ns 1.3552 ns] | [228.77 us 232.17 us 236.23 us] | [24.688 ns 25.083 ns 25.551 ns] | [22.832 ns 22.910 ns 22.995 ns] |
|
| Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz | [1.4321 us 1.4339 us 1.4357 us] | [1.3385 ns 1.3456 ns 1.3552 ns] | [228.77 us 232.17 us 236.23 us] | [24.688 ns 25.083 ns 25.551 ns] | [22.832 ns 22.910 ns 22.995 ns] |
|
||||||
| Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz | [1.3439 us 1.3499 us 1.3562 us] | [1.5416 ns 1.5446 ns 1.5481 ns] | [197.46 us 198.37 us 199.22 us] | [20.455 ns 20.486 ns 20.518 ns] | [18.726 ns 18.850 ns 18.993 ns] |
|
| Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz | [1.3439 us 1.3499 us 1.3562 us] | [1.5416 ns 1.5446 ns 1.5481 ns] | [197.46 us 198.37 us 199.22 us] | [20.455 ns 20.486 ns 20.518 ns] | [18.726 ns 18.850 ns 18.993 ns] |
|
||||||
|
| Apple M1 ARM (Macbook Air) | [3.3367 us 3.3629 us 3.4058 us] | [741.75 ps 742.65 ps 743.52 ps] | [210.14 us 210.23 us 210.34 us] | [27.567 ns 27.602 ns 27.650 ns] | [26.716 ns 26.735 ns 26.755 ns] |
|
||||||
|
|
||||||
# Contributing
|
# Contributing
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
use criterion::{black_box, criterion_group, criterion_main, Criterion};
|
use criterion::{black_box, criterion_group, criterion_main, Criterion};
|
||||||
|
use std::convert::TryFrom;
|
||||||
|
|
||||||
use sharks::{Share, Sharks};
|
use sharks::{Share, Sharks};
|
||||||
|
|
||||||
|
@ -24,10 +25,10 @@ fn recover(c: &mut Criterion) {
|
||||||
fn share(c: &mut Criterion) {
|
fn share(c: &mut Criterion) {
|
||||||
let bytes_vec = vec![1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
let bytes_vec = vec![1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
||||||
let bytes = bytes_vec.as_slice();
|
let bytes = bytes_vec.as_slice();
|
||||||
let share = Share::from(bytes);
|
let share = Share::try_from(bytes).unwrap();
|
||||||
|
|
||||||
c.bench_function("share_from_bytes", |b| {
|
c.bench_function("share_from_bytes", |b| {
|
||||||
b.iter(|| Share::from(black_box(bytes)))
|
b.iter(|| Share::try_from(black_box(bytes)))
|
||||||
});
|
});
|
||||||
|
|
||||||
c.bench_function("share_to_bytes", |b| {
|
c.bench_function("share_to_bytes", |b| {
|
||||||
|
|
Loading…
Reference in New Issue