Skip to content

Optimize AssertIsLessOrEqual api#1194

Merged
gbotrel merged 1 commit intoConsensys:masterfrom
lightning-li:optimize_less_or_equal_api
Jul 11, 2024
Merged

Optimize AssertIsLessOrEqual api#1194
gbotrel merged 1 commit intoConsensys:masterfrom
lightning-li:optimize_less_or_equal_api

Conversation

@lightning-li
Copy link
Copy Markdown
Contributor

@lightning-li lightning-li commented Jul 10, 2024

Description

Optimize the AssertIsLessOrEqual API by moving ToBinary into the code block where bConst is true. This change avoids one ToBinary constraint when both arguments of AssertIsLessOrEqual are variables.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How has this been tested?

No new test cases have been added; use the existing relevant test cases

How has this been benchmarked?

  • Benchmark A, on Macbook pro M1, 32GB RAM
  • Benchmark B, on x86 Intel xxx, 16GB RAM

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

@gbotrel gbotrel self-requested a review July 11, 2024 09:13
Copy link
Copy Markdown
Collaborator

@gbotrel gbotrel left a comment

Choose a reason for hiding this comment

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

lgtm, thanks for the contribution

@gbotrel gbotrel merged commit e3f932b into Consensys:master Jul 11, 2024
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