Skip to content

Conversation

perturbing
Copy link
Collaborator

Pre-submit checklist:

  • Branch
    • Tests are provided (if possible)
    • Commit sequence broadly makes sense
    • Key commits have useful messages
    • Changelog fragments have been written (if appropriate)
    • Relevant tickets are mentioned in commit messages
    • Formatting, PNG optimization, etc. are updated
  • PR
    • (For external contributions) Corresponding issue exists and is linked in the description
    • Targeting master unless this is a cherry-pick backport
    • Self-reviewed the diff
    • Useful pull request description
    • Reviewer requested

@@ -170,3 +171,10 @@ memSizeBytes = BlstBindings.Internal.sizePoint (Proxy @BlstBindings.Curve1)
-- | Compressed size of a G1 point (48 bytes)
compressedSizeBytes :: Int
compressedSizeBytes = BlstBindings.Internal.compressedSizePoint (Proxy @BlstBindings.Curve1)

-- | Multi-scalar multiplication of G1 points.
-- Uses MSM when the number of pairs exceeds a threshold (currently 10).
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@kwxm when costing, we should run the bench against different thresholds here. This 10 is an arbitrary value I randomly picked, I remember from the initial rust benchmarking @dkaidalov did, this threshold was 30, but I am unsure. Do you remember Dmytro?

Choose a reason for hiding this comment

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

not sure what threshold do you mean? From my benchmarks the blst MSM is more efficient than naive impl already from the size of 3. There is indeed a threshold at 30, when the blst lib becomes suddenly several times more efficient (if I remember correctly there is some MSM mechanism switching at 30, programmed in rust bindings)

@perturbing
Copy link
Collaborator Author

Closed in favor of rebase #7283

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.

2 participants