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

Checking if zero and equality checking in jacobian_add_2007_bl has huge impact in performance #39

Open
FoodChain1028 opened this issue Jan 17, 2025 · 0 comments

Comments

@FoodChain1028
Copy link
Collaborator

Problem

metal_msm::curve::jacobian::jacobian_add_2007_bl() currently has a equality and zero check; however, the ec curve algorithm suppose that users use dbl operation whenever meeting two elements are equal.

Details

We have to check if the check impact the performance a lot

this is the checking code:

    if (is_jacobian_zero(a)) {
        return b;
    }
    if (is_jacobian_zero(b)) {
        return a;
    }
    if (a == b) return jacobian_dbl_2009_l(a, p);

Acceptance criteria

  • benchmark the jacobian_add_2007_bl with and without the checking and observer the performance while having large operations.
  • if the benchmark do not show that there is huge impact, we could keep the current version for addition for better DX
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

No branches or pull requests

1 participant