Add benchmark for conversion to avx2 format

This commit is contained in:
Henry de Valence 2017-11-20 12:38:36 -08:00
parent 208180dc72
commit 77766b3422

View file

@ -771,6 +771,21 @@ mod bench {
use constants;
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]
fn point_addition(b: &mut Bencher) {
let B = &constants::ED25519_BASEPOINT_TABLE;