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

Implement more optimized version of u32lt #1193

Merged
merged 3 commits into from
Jan 26, 2024
Merged

Conversation

Fumuran
Copy link
Contributor

@Fumuran Fumuran commented Jan 11, 2024

This small PR optimizes the u32lt instruction, reducing the number of cycles by 2: from 5 to 3. Number of cycles required for instructions u32lte, u32gt and u32gte was also reduced by 2, since these instructions were using u32lt internally.

As it was mentioned in the related issue (#1190), this change will bleak the tests in the miden-base, so we need to change the hardcoded roots there before merge.

@Fumuran Fumuran requested a review from bobbinth January 11, 2024 19:18
@Fumuran Fumuran linked an issue Jan 11, 2024 that may be closed by this pull request
Copy link
Contributor

@bobbinth bobbinth left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you! Before merging this, let's have a PR in miden-base to make sure we can have all the tests there working with these changes applies.

Also, I don't think this would affect field operation comparisons (lt, gt, etc.) - but could you double-check if anything there can be improved as well?

@Fumuran Fumuran requested a review from bobbinth January 12, 2024 12:59
@Fumuran Fumuran force-pushed the andrew-optimize-u32lt branch from 37edd79 to a36103d Compare January 12, 2024 18:26
Copy link
Contributor

@bobbinth bobbinth left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you! Let's merge after we've fixed tests in miden-base.

@bobbinth bobbinth force-pushed the andrew-optimize-u32lt branch from a36103d to 52e972b Compare January 26, 2024 07:53
@bobbinth bobbinth merged commit bd10b8c into next Jan 26, 2024
15 checks passed
@bobbinth bobbinth deleted the andrew-optimize-u32lt branch January 26, 2024 08:17
bobbinth pushed a commit that referenced this pull request Feb 26, 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.

Implement more optimized version of u32lt
2 participants