Skip to content

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

@jeffoodchain

Description

@jeffoodchain

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions