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

Parallel pippenger from blst #211

Merged
merged 4 commits into from
Apr 6, 2023
Merged

Conversation

belijzajac
Copy link
Collaborator

I found out that there already exists a Pippenger's implementation for supranational/blst rust binding, which appears to use buckets (a large grid for storing the results) and a thread pool for parallelization.

Implementing it achieved the following results:

Benchmark Old New Speedup
blob_to_kzg_commitment 54.145 ms 17.132 ms 3.16x
compute_kzg_proof 65.029 ms 26.509 ms 2.45x
compute_blob_kzg_proof 65.680 ms 27.342 ms 2.40x
bench_commit_to_poly 348.61 ms 97.402 ms 3.58x

However, there seemed to be a little caveat that it didn't work for certain lengths:

  • 0 --> panics with message scalars length mismatch
  • 1 --> fails the test_fk_multi_chunk_len_1_512 test
  • 6 --> fails 1 out of 222 test vectors

So we opted out for a naive approach for lengths less than 8.

Related issue: #202

@belijzajac belijzajac merged commit c4d4893 into main Apr 6, 2023
@belijzajac belijzajac deleted the parallel_pippenger_from_blst branch April 6, 2023 14:15
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.

1 participant