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

Modify constant order for same frequency #66

Merged
merged 3 commits into from
Jun 11, 2021
Merged

Conversation

jasonpaulos
Copy link
Member

Prior to this PR, when compiling with assembleConstants enabled, constants referenced with the same frequency would have their order determined by comparing the value of the constant being referenced. This PR takes advantage of Python's stable sorting to maintain the relative order of constants with the same frequency instead of using their value as an arbitrary tiebreaker.

This change should make PyTeal's constant assembly identical to the optimized assembly implemented in algorand/go-algorand#2215.

@jasonpaulos jasonpaulos merged commit 100db68 into master Jun 11, 2021
@jasonpaulos jasonpaulos deleted the modify-const-order branch June 11, 2021 16:40
@jasonpaulos jasonpaulos mentioned this pull request Aug 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant