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

Optimize AssertIsLessOrEqual api #1194

Merged
merged 1 commit into from
Jul 11, 2024

Conversation

lightning-li
Copy link
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
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
4 of 5 checks passed
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