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 string addition somewhat to reduce IDE lag #502

Merged
merged 1 commit into from
Jun 2, 2024

Conversation

SteveMcNeill
Copy link
Member

Very simple change here, to basically take:

a$ = b$ + c$ + d$ + e$ + f$

And make it:

a$ = b$ + (c$ + d$ + e$) + f$

....

This speeds up the IDE due to (c$ + d$ + e$) being small strings, while a$ and f$ are larger strings... It's more efficient to move and add those small strings first, than it is to add them to the large strings, making them larger, at each step.

Very simple change here, to basically take:

a$ = b$ + c$ + d$ + e$ + f$

And make it:

a$ = b$ + (c$ + d$ + e$) + f$

....

This speeds up the IDE due to (c$ + d$ + e$) being small strings, while a$ and f$ are larger strings...  It's more efficient to move and add those small strings first, than it is to add them to the large strings, making them larger, at each step.
@SteveMcNeill SteveMcNeill merged commit 78cdac1 into QB64-Phoenix-Edition:main Jun 2, 2024
4 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