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

Add option to assemble constants #57

Merged
merged 6 commits into from
Apr 20, 2021
Merged

Add option to assemble constants #57

merged 6 commits into from
Apr 20, 2021

Conversation

jasonpaulos
Copy link
Contributor

@jasonpaulos jasonpaulos commented Apr 16, 2021

This PR adds an option called assembleConstants to the compileTeal function. When set to true, this enables the compiler to assemble constants into intcblock and bytecblock instead of using the pseudo-ops int, byte, and addr. This option is disabled by default to maintain backwards compatibility.

For large programs that use many constants, this will likely reduce program size by a noticeable amount, since algod currently does not assemble constants in the most space-efficient way.

Closes #56.

@jasonpaulos jasonpaulos marked this pull request as ready for review April 20, 2021 18:42
@jasonpaulos jasonpaulos merged commit cfb4506 into master Apr 20, 2021
@jasonpaulos jasonpaulos deleted the optimize-constants branch April 20, 2021 19:01
@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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Optimize constants
1 participant