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

Refactor: pairings #366

Merged
merged 18 commits into from
Mar 29, 2023
Merged

Refactor: pairings #366

merged 18 commits into from
Mar 29, 2023

Conversation

yelhousni
Copy link
Collaborator

Some refactoring and small optimisations of pairings ported from gnark.

@yelhousni yelhousni added cleanup Suggestion to clean up the code perf consolidate strengthen an existing feature labels Mar 26, 2023
@yelhousni yelhousni added this to the v0.10.0 milestone Mar 26, 2023
@yelhousni yelhousni self-assigned this Mar 26, 2023
@yelhousni
Copy link
Collaborator Author

Some benchmarks on Intel(R) Xeon(R) Platinum 8151 CPU @ 3.40GHz.

BN254:

benchmark                         old ns/op     new ns/op     delta
BenchmarkPairing-2                411813        406969        -1.18%
BenchmarkMultiPair/2_pairs-2      555552        548078        -1.35%
BenchmarkMultiPair/3_pairs-2      697761        688646        -1.31%

BLS12-381:

benchmark                         old ns/op     new ns/op     delta
BenchmarkPairing-2                627514        623349        -0.66%
BenchmarkMultiPair/2_pairs-2      819556        815842        -0.45%
BenchmarkMultiPair/3_pairs-2      1010009       1005709       -0.43%

BLS12-377:

benchmark                         old ns/op     new ns/op     delta
BenchmarkPairing-2                847109        841373        -0.68%
BenchmarkMultiPair/2_pairs-2      1098540       1085993       -1.14%
BenchmarkMultiPair/3_pairs-2      1343194       1325140       -1.34%

BW6-761:

benchmark                         old ns/op     new ns/op     delta
BenchmarkPairing-2                2257147       2247891       -0.41%
BenchmarkMultiPair/2_pairs-2      3034059       3025737       -0.27%
BenchmarkMultiPair/3_pairs-2      3802704       3785700       -0.45%

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.

Looks good.

@yelhousni yelhousni merged commit a57dcc3 into develop Mar 29, 2023
@yelhousni yelhousni deleted the refactor/pairings branch March 29, 2023 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Suggestion to clean up the code consolidate strengthen an existing feature perf
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants