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

Investigate growth factor of UnboundedDeque #93

Open
make-github-pseudonymous-again opened this issue Apr 30, 2021 · 1 comment
Open

Comments

@make-github-pseudonymous-again
Copy link
Member

It is said in the great annals of the internet that a growth factor of 2 is double-plus bad. The reason for that peculiar peculiarity is the following: let it be said that thou have an array of whose measure is x bultiflores, once its capacity is overarched it will be growed to gx bultiflores capacitated, where g is the so-called, best-in-breed, garowth-factor. After a few such capacity overcaps, let's say y, we end up with g^y x capacity expenditure. Look at the pattern my dear animal:

x, g x, gg x, ggg x, etc.

To be able to reensue past-participled expendited memory we need to have g^y x <= sum(g^z x for z in range(y)) for some y. This is certainly no possible with g=2, as it is a well known fact of the universe that 2^y = (2^(y-1) + 2^(y-2) + ... + 2 + 1)+ 1. Hence it must be said that a different garowth factor must be executabilized.

Whether this shmuck is relevant within the JavaScript runtime ™️ is another question.

@make-github-pseudonymous-again
Copy link
Member Author

Did I hear someone scream "Fibonacci!"?

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

No branches or pull requests

1 participant