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

Use 64-bit implementation for Fp32 #1097

Closed
wants to merge 1 commit into from

Conversation

armfazh
Copy link
Contributor

@armfazh armfazh commented Jul 17, 2024

Using 64-bit implementation for Fp32, previously, it was using the 128-bit implementation.

Another option is to use directly a dedicated 32-bit implementation, but I will propose that in PR #1098 .

$ cargo bench --bench speed_tests -- poly_mul
poly_mul n Time Change
fft 1 210.72 ns -19.316%
fft 30 5.1285 µs -39.153%
fft 60 11.299 µs -40.479%
fft 90 24.815 µs -42.182%
fft 120 24.746 µs -42.175%
fft 150 53.449 µs -42.518%
fft 255 54.293 µs -42.240%
direct 1 68.245 ns -26.112%
direct 30 4.4645 µs -46.017%
direct 60 17.331 µs -44.944%
direct 90 67.985 µs -45.110%
direct 120 70.084 µs -44.915%
direct 150 265.90 µs -47.659%
direct 255 268.17 µs -44.727%

@armfazh armfazh requested a review from a team as a code owner July 17, 2024 18:33
src/fp.rs Show resolved Hide resolved
@@ -817,7 +817,7 @@ impl Integer for u128 {
make_field!(
/// Same as Field32, but encoded in little endian for compatibility with Prio v2.
Copy link
Contributor

Choose a reason for hiding this comment

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

FWIW this comment is out of date (had me confused for a bit). We changed all field encodings to be little-endian in #495, following a change in draft-irtf-cfrg-vdaf-05. Thus, Prio v2 and VDAF all use the same encoding.

@armfazh
Copy link
Contributor Author

armfazh commented Jul 19, 2024

Closing in favor of #1099

@armfazh armfazh closed this Jul 19, 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.

3 participants