Browse Source

Use imported Fr

v0.0.7
pull/4/head
arnaucube 4 years ago
parent
commit
4c5dadf3f7
2 changed files with 5 additions and 6 deletions
  1. +1
    -1
      Cargo.toml
  2. +4
    -5
      benches/bench_poseidon_hash.rs

+ 1
- 1
Cargo.toml

@ -1,6 +1,6 @@
[package]
name = "poseidon-rs"
version = "0.0.4"
version = "0.0.7"
authors = ["arnaucube <root@arnaucube.com>"]
edition = "2018"
license = "GPL-3.0"

+ 4
- 5
benches/bench_poseidon_hash.rs

@ -1,22 +1,21 @@
use criterion::{criterion_group, criterion_main, Criterion};
extern crate rand;
#[macro_use]
extern crate ff;
use ff::*;
use poseidon_rs::Poseidon;
use poseidon_rs::{Fr, Poseidon};
fn criterion_benchmark(c: &mut Criterion) {
let b1: poseidon_rs::Fr = poseidon_rs::Fr::from_str(
let b1: Fr = Fr::from_str(
"12242166908188651009877250812424843524687801523336557272219921456462821518061",
)
.unwrap();
let b2: poseidon_rs::Fr = poseidon_rs::Fr::from_str(
let b2: Fr = Fr::from_str(
"12242166908188651009877250812424843524687801523336557272219921456462821518061",
)
.unwrap();
let mut big_arr: Vec<poseidon_rs::Fr> = Vec::new();
let mut big_arr: Vec<Fr> = Vec::new();
big_arr.push(b1.clone());
big_arr.push(b2.clone());
let poseidon = Poseidon::new();

Loading…
Cancel
Save