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

Don't copy single-use strings to the zero page #438

Open
mysterymath opened this issue Jan 31, 2024 · 0 comments
Open

Don't copy single-use strings to the zero page #438

mysterymath opened this issue Jan 31, 2024 · 0 comments
Labels
optimization Improving the speed or size of generated code p1

Comments

@mysterymath
Copy link
Member

The compiler is currently allocating strings that are only printed once to the zero page. It's likely overestimating the loop count for accesses to the strings; it should never pay off to move such to the zero page unless the string is used several times, since the loop that would copy it there is the same size as the loop that accesses it. We either need to add a special-case heuristic or expose better loop trip count information to the zero page allocation pass.

@mysterymath mysterymath added optimization Improving the speed or size of generated code p1 labels Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
optimization Improving the speed or size of generated code p1
Projects
None yet
Development

No branches or pull requests

1 participant