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

Boxed blobs version 2 #334

Closed
wants to merge 16 commits into from
Closed

Conversation

pawanjay176
Copy link
Contributor

Experimenting with boxing blobs.

Should hopefully eventually resolve #331

@@ -82,6 +82,7 @@ pub fn criterion_benchmark(c: &mut Criterion) {

c.bench_function("verify_kzg_proof", |b| {
b.iter(|| {
print!("");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this is what fixes the benchmarks 😅 we should probably add a comment here.

assert!(matches!(error, Error::MismatchLength(_)));

let incorrect_blob = generate_random_blob(&mut rng);
blobs.push(incorrect_blob);

let blobs_copy: Vec<Blob> = blobs.iter().map(|b| *b.clone()).collect();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wish there were a way to convert from Vec<Box<Blob>> to Vec<Blob> without the blob being stored on the stack intermediately. Unfortunately, I think this is a pretty difficult to do without unsafe code.

@pawanjay176 pawanjay176 marked this pull request as draft August 15, 2023 01:53
@jtraglia
Copy link
Member

This is no longer needed. The root issue was identified. Fixed here:

@jtraglia jtraglia closed this Aug 31, 2023
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

Successfully merging this pull request may close these issues.

Stack overflow in Rust benchmarks on Windows
2 participants