mirror of
https://github.com/arnaucube/ark-curves-cherry-picked.git
synced 2026-01-08 06:51:32 +01:00
Add benchmarks for Pallas and Vesta curves. (#53)
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
`ark-mnt6-753`.
|
||||
- [\#7](https://github.com/arkworks-rs/curves/pull/7) Add benchmarks for Edwards curves.
|
||||
- [\#19](https://github.com/arkworks-rs/curves/pull/19) Change field constants to be provided as normal strings, instead of in Montgomery form.
|
||||
- [\#53](https://github.com/arkworks-rs/curves/pull/53) Add benchmarks for Pallas and Vesta curves.
|
||||
|
||||
### Improvements
|
||||
- [\#42](https://github.com/arkworks-rs/curves/pull/42) Remove the dependency of `rand_xorshift`.
|
||||
@@ -30,4 +31,4 @@
|
||||
|
||||
## v0.1.0
|
||||
|
||||
Initial Release
|
||||
Initial Release
|
||||
|
||||
@@ -7,7 +7,8 @@ authors = [
|
||||
"Matthew Green",
|
||||
"Ian Miers",
|
||||
"Pratyush Mishra",
|
||||
"Howard Wu"
|
||||
"Howard Wu",
|
||||
"Daira Hopwood"
|
||||
]
|
||||
description = "A benchmark library for finite fields and elliptic curves"
|
||||
homepage = "https://arkworks.rs"
|
||||
@@ -42,6 +43,8 @@ ark-bls12-381 = { path = "../bls12_381" }
|
||||
ark-ed-on-bls12-381 = { path = "../ed_on_bls12_381" }
|
||||
ark-bw6-761 = { path = "../bw6_761" }
|
||||
ark-cp6-782 = { path = "../cp6_782" }
|
||||
ark-pallas = { path = "../pallas" }
|
||||
ark-vesta = { path = "../vesta" }
|
||||
|
||||
[features]
|
||||
asm = [ "ark-ff/asm"]
|
||||
@@ -100,3 +103,13 @@ harness = false
|
||||
name = "mnt6_753"
|
||||
path = "benches/mnt6_753.rs"
|
||||
harness = false
|
||||
|
||||
[[bench]]
|
||||
name = "pallas"
|
||||
path = "benches/pallas.rs"
|
||||
harness = false
|
||||
|
||||
[[bench]]
|
||||
name = "vesta"
|
||||
path = "benches/vesta.rs"
|
||||
harness = false
|
||||
|
||||
19
curve-benches/benches/pallas.rs
Normal file
19
curve-benches/benches/pallas.rs
Normal file
@@ -0,0 +1,19 @@
|
||||
use ark_curve_benches::*;
|
||||
use ark_std::ops::{AddAssign, MulAssign, SubAssign};
|
||||
|
||||
use ark_ec::ProjectiveCurve;
|
||||
use ark_ff::{
|
||||
biginteger::{BigInteger256 as FrRepr, BigInteger256 as FqRepr},
|
||||
BigInteger, Field, PrimeField, SquareRootField, UniformRand,
|
||||
};
|
||||
use ark_pallas::{fq::Fq, fr::Fr, Affine as GAffine, Projective as G};
|
||||
|
||||
mod g {
|
||||
use super::*;
|
||||
ec_bench!(G, GAffine);
|
||||
}
|
||||
|
||||
f_bench!(Fq, Fq, FqRepr, FqRepr, fq);
|
||||
f_bench!(Fr, Fr, FrRepr, FrRepr, fr);
|
||||
|
||||
bencher::benchmark_main!(fq, fr, g::group_ops);
|
||||
19
curve-benches/benches/vesta.rs
Normal file
19
curve-benches/benches/vesta.rs
Normal file
@@ -0,0 +1,19 @@
|
||||
use ark_curve_benches::*;
|
||||
use ark_std::ops::{AddAssign, MulAssign, SubAssign};
|
||||
|
||||
use ark_ec::ProjectiveCurve;
|
||||
use ark_ff::{
|
||||
biginteger::{BigInteger256 as FrRepr, BigInteger256 as FqRepr},
|
||||
BigInteger, Field, PrimeField, SquareRootField, UniformRand,
|
||||
};
|
||||
use ark_vesta::{fq::Fq, fr::Fr, Affine as GAffine, Projective as G};
|
||||
|
||||
mod g {
|
||||
use super::*;
|
||||
ec_bench!(G, GAffine);
|
||||
}
|
||||
|
||||
f_bench!(Fq, Fq, FqRepr, FqRepr, fq);
|
||||
f_bench!(Fr, Fr, FrRepr, FrRepr, fr);
|
||||
|
||||
bencher::benchmark_main!(fq, fr, g::group_ops);
|
||||
Reference in New Issue
Block a user