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

perf: Compute disallowed result once #5

Merged
merged 1 commit into from
Aug 21, 2024

Conversation

atifaziz
Copy link
Contributor

@atifaziz atifaziz commented Jan 8, 2020

The disallowed result was computed on each iteration (causing a string allocation) of the do-while loop, which seems wasteful. This PR moves the computation of the disallowed result out of the loop.

@alexmg alexmg force-pushed the cache-disallowed-result branch from 2249f1e to 4eb9bb4 Compare August 21, 2024 14:46
@alexmg alexmg changed the title Compute disallowed result once perf: Compute disallowed result once Aug 21, 2024
@alexmg alexmg merged commit 1e01890 into alexmg:develop Aug 21, 2024
1 check passed
@alexmg
Copy link
Owner

alexmg commented Aug 21, 2024

The probability of Wozniak being boring, and the loop being entered a second time is low, but I might make this configurable in the future in case someone has a strong opinion about who else isn't boring. 😄

@atifaziz atifaziz deleted the cache-disallowed-result branch August 22, 2024 15:51
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