Skip to content

Commit 72fe7bc

Browse files
authored
Fix ed448-goldilocks Benchmark Suite (#1384)
1 parent ff17407 commit 72fe7bc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ed448-goldilocks/benches/bench.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ use ed448_goldilocks::{
33
CompressedDecaf, CompressedEdwardsY, Decaf448, DecafPoint, DecafScalar, EdwardsPoint,
44
EdwardsScalar, MontgomeryPoint,
55
};
6+
use elliptic_curve::group::GroupEncoding;
67
use elliptic_curve::{Field, Group};
78
use hash2curve::{ExpandMsgXof, GroupDigest};
89
use rand_core::{OsRng, TryRngCore};
@@ -62,14 +63,14 @@ pub fn ed448(c: &mut Criterion) {
6263
group.bench_function("compress", |b| {
6364
b.iter_batched(
6465
|| EdwardsPoint::try_from_rng(&mut OsRng).unwrap(),
65-
|point| point.compress().0,
66+
|point| point.to_bytes().0,
6667
BatchSize::SmallInput,
6768
)
6869
});
6970

7071
group.bench_function("decompress", |b| {
7172
b.iter_batched(
72-
|| EdwardsPoint::try_from_rng(&mut OsRng).unwrap().compress().0,
73+
|| EdwardsPoint::try_from_rng(&mut OsRng).unwrap().to_bytes().0,
7374
|bytes| CompressedEdwardsY(bytes).decompress().unwrap(),
7475
BatchSize::SmallInput,
7576
)

0 commit comments

Comments
 (0)