Skip to content

Conversation

@yelhousni
Copy link
Contributor

Description

In non-native arithmetic subtractions are costlier than additions. In this PR we re-arrange some subs into adds.

Type of change

  • New feature (non-breaking change which adds functionality)

How has this been tested?

All pairing tests pass.

How has this been benchmarked?

This PR saves 22,462 scs in the ECPAIR precompile of size 4. The bigger the size the more it saves (given that new points are added to the multi-Miller loop).

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I did not modify files generated from templates
  • golangci-lint does not output errors locally
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@yelhousni yelhousni added type: perf dep: linea Issues affecting Linea downstream labels Aug 21, 2024
@yelhousni yelhousni requested a review from ivokub August 21, 2024 22:29
@yelhousni yelhousni self-assigned this Aug 21, 2024
Copy link
Collaborator

@ivokub ivokub left a comment

Choose a reason for hiding this comment

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

LGTM! One small comment about refactor only.

@yelhousni yelhousni requested a review from ivokub August 22, 2024 15:15
Copy link
Collaborator

@ivokub ivokub left a comment

Choose a reason for hiding this comment

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

Perfect! Thanks for addressing the comments.

@yelhousni yelhousni merged commit 1f7f38f into master Sep 3, 2024
@yelhousni yelhousni deleted the perf/ML branch September 3, 2024 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dep: linea Issues affecting Linea downstream type: perf

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants