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(2-chain/varScalarMul): use DoubleAndAdd to reduce #constraints #706

Merged
merged 1 commit into from
May 29, 2023

Conversation

yelhousni
Copy link
Contributor

@yelhousni yelhousni commented May 29, 2023

While looking into a question about emulated ScalarMul, I noticed we can further merge some Double+ Add into a DoubleAndAdd to reduce the number of constraints. Hence the tiny PR.

  • Old
BenchmarkVarScalarMulG1
    g1_test.go:460: groth16 1548
BenchmarkVarScalarMulG1/plonk
    g1_test.go:471: plonk 3861
BenchmarkVarScalarMulG2
    g2_test.go:496: groth16 4250
BenchmarkVarScalarMulG2/plonk
    g2_test.go:507: plonk 12604
  • New:
BenchmarkVarScalarMulG1
    g1_test.go:460: groth16 1544
BenchmarkVarScalarMulG1/plonk
    g1_test.go:471: plonk 3858
BenchmarkVarScalarMulG2
    g2_test.go:496: groth16 4240
BenchmarkVarScalarMulG2/plonk
    g2_test.go:507: plonk 12579

@yelhousni yelhousni added the perf label May 29, 2023
@yelhousni yelhousni requested a review from ivokub May 29, 2023 13:20
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.

🚀

@yelhousni yelhousni merged commit ff596b2 into develop May 29, 2023
@yelhousni yelhousni deleted the perf/scalarMul-2chain branch May 29, 2023 15:51
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.

2 participants