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

v2(nightly) - Adding Fp128 implementation based on fiat-crypto #781

Closed
wants to merge 2 commits into from

Conversation

armfazh
Copy link
Contributor

@armfazh armfazh commented Oct 4, 2023

fiat_crypto without primitives

This is an implementation of Fp128 using fiat-crypto. The code generated needs a wrapper to implement the traits required by FieldElement.

The downside of this implementation is the performance observed. To improve on top of #758 , this PR implements the primitives using rust intrinsics available only in nightly.

Timings

Fp128 Primitives No Primitives
poly_mul/fft Current fiat-crypto Change fiat-crypto Change
1 180.14 ns 281.47 ns +57.701% 237.39 ns +56.250%
30 5.7912 µs 10.398 µs +79.487% 8.8421 µs +52.681%
60 12.925 µs 24.852 µs +87.113% 20.228 µs +56.502%
90 29.935 µs 53.975 µs +80.685% 47.558 µs +58.870%
120 28.688 µs 59.180 µs +101.55% 46.196 µs +61.029%
150 64.779 µs 127.07 µs +97.426% 104.41 µs +61.178%

@armfazh armfazh requested a review from a team as a code owner October 4, 2023 03:34
@armfazh armfazh changed the title v2 - Adding Fp128 implementation based on fiat-crypto v2(nightly) - Adding Fp128 implementation based on fiat-crypto Oct 10, 2023
@cjpatton cjpatton closed this Feb 16, 2024
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.

None yet

2 participants