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

Perf: Toom-3 for Fp6 in R1CS #1131

Merged
merged 6 commits into from May 15, 2024
Merged

Perf: Toom-3 for Fp6 in R1CS #1131

merged 6 commits into from May 15, 2024

Conversation

yelhousni
Copy link
Contributor

@yelhousni yelhousni commented May 10, 2024

Description

For cubic extensions use Toom-3 in R1CS and Karatsuba in SCS.

Type of change

  • New feature (non-breaking change which adds functionality)

How has this been tested?

  • Equality check between Karatsuba and Toom-3 variants + equality with gnark-crypto.

How has this been benchmarked?

A single pairing on:

  • BLS12-377 (native):
    old: 13,289 R1CS
    new: 12,588 R1CS

  • BN254 (emulated):
    old: 973,423 R1CS
    new: 972,708 R1CS

  • BLS12-381 (emulated):
    old: 1,436,626 R1CS
    new: 1,429,646 R1CS

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I did not modify files generated from templates
  • golangci-lint does not output errors locally
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@yelhousni yelhousni added the perf label May 10, 2024
@yelhousni yelhousni requested a review from ivokub May 10, 2024 19:25
@yelhousni yelhousni self-assigned this May 10, 2024
Copy link
Collaborator

@ivokub ivokub left a comment

Choose a reason for hiding this comment

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

LGTM!

@yelhousni yelhousni merged commit e204083 into master May 15, 2024
7 checks passed
@yelhousni yelhousni deleted the perf/toom3-r1cs branch May 15, 2024 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants