Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider creating a bench/test_utils crate #153

Open
kevaundray opened this issue Aug 13, 2024 · 1 comment
Open

Consider creating a bench/test_utils crate #153

kevaundray opened this issue Aug 13, 2024 · 1 comment

Comments

@kevaundray
Copy link
Contributor

A lot of the benchmark code needs to create random polynomials, blobs, etc -- we can group all of this into a test_utils/bench_utils crate to avoid deduplication

@kevaundray
Copy link
Contributor Author

Most notably, remove deduplication on:

fn random_scalars(size: usize) -> Vec<Scalar> {
    let mut scalars = Vec::with_capacity(size);
    for _ in 0..size {
        scalars.push(Scalar::random(&mut rand::thread_rng()))
    }
    scalars
}
fn random_g1_points(size: usize) -> Vec<G1Projective> {
    let mut points = Vec::with_capacity(size);
    for _ in 0..size {
        points.push(G1Projective::random(&mut rand::thread_rng()))
    }
    points
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant