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

feat(integer): improve scalar_mul #517

Merged
merged 1 commit into from
Sep 22, 2023
Merged

feat(integer): improve scalar_mul #517

merged 1 commit into from
Sep 22, 2023

Conversation

tmontaigu
Copy link
Contributor

@tmontaigu tmontaigu commented Aug 30, 2023

PR content/description

This changes the algorithm for scalar_mul.
The new algorithm allows to remove a lot of work.

For small precisions (16, 32, 64) the gains are in range 5%-10% for higher precisions the gains are 25%-50%.

This also changes the mul to use the functions that sums many clean ciphertexts in parallel. For mul, there is only a 5%-10% improvements for 128bits and 256bits mul.

@github-actions
Copy link

@slab-ci cpu_fast_test

@github-actions
Copy link

@slab-ci cpu_fast_test

@github-actions
Copy link

@slab-ci cpu_fast_test

@github-actions
Copy link

@slab-ci cpu_fast_test

@github-actions
Copy link

@slab-ci cpu_fast_test

@github-actions
Copy link

@slab-ci cpu_fast_test

@tmontaigu
Copy link
Contributor Author

@slab-ci cpu_fast_test

Copy link
Member

@IceTDrinker IceTDrinker left a comment

Choose a reason for hiding this comment

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

I realize my comment is on some "old" code, but I could not help but notice it may not be quite right ?

@github-actions
Copy link

Pull Request has been approved 🎉
Launching full test suite...
@slab-ci cpu_test
@slab-ci cpu_integer_test
@slab-ci cpu_multi_bit_test
@slab-ci cpu_wasm_test
@slab-ci csprng_randomness_testing

This changes the algorithm for scalar_mul.
The new algorithm allows to remove a lot of work.

For small precisions (16, 32, 64) the gains are in range 5%-10%
for higher precisions the gains are 25%-50%.

This also changes the mul to use the functions that sums many
clean ciphertexts in parallel. For mul, there is only a 5%-10%
improvements for 128bits and 256bits mul.
@github-actions
Copy link

@slab-ci cpu_fast_test

@IceTDrinker
Copy link
Member

what's the diff on your last push ?

@tmontaigu
Copy link
Contributor Author

Just rebased on top of the fix to the signed_div_rem test in the case of doing 0/0
which was discovered in the CI run of this PR

@github-actions
Copy link

Pull Request has been approved 🎉
Launching full test suite...
@slab-ci cpu_test
@slab-ci cpu_integer_test
@slab-ci cpu_multi_bit_test
@slab-ci cpu_wasm_test
@slab-ci csprng_randomness_testing

@tmontaigu tmontaigu merged commit 7fe3ad3 into main Sep 22, 2023
19 checks passed
@tmontaigu tmontaigu deleted the better-scalar-mul branch September 22, 2023 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants