mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-08 21:00:40 +00:00
Add benchmark for conversion to avx2 format
This commit is contained in:
parent
208180dc72
commit
77766b3422
1 changed files with 15 additions and 0 deletions
|
|
@ -771,6 +771,21 @@ mod bench {
|
||||||
use constants;
|
use constants;
|
||||||
use scalar::Scalar;
|
use scalar::Scalar;
|
||||||
|
|
||||||
|
#[bench]
|
||||||
|
fn conversion_into__avx2_format(b: &mut Bencher) {
|
||||||
|
let B = constants::ED25519_BASEPOINT_POINT;
|
||||||
|
|
||||||
|
b.iter(|| ExtendedPoint::from(B));
|
||||||
|
}
|
||||||
|
|
||||||
|
#[bench]
|
||||||
|
fn conversion_outof_avx2_format(b: &mut Bencher) {
|
||||||
|
let B = constants::ED25519_BASEPOINT_POINT;
|
||||||
|
let B_avx2 = ExtendedPoint::from(B);
|
||||||
|
|
||||||
|
b.iter(|| edwards::ExtendedPoint::from(B_avx2));
|
||||||
|
}
|
||||||
|
|
||||||
#[bench]
|
#[bench]
|
||||||
fn point_addition(b: &mut Bencher) {
|
fn point_addition(b: &mut Bencher) {
|
||||||
let B = &constants::ED25519_BASEPOINT_TABLE;
|
let B = &constants::ED25519_BASEPOINT_TABLE;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue