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

Trampoline #16

Merged
merged 14 commits into from
Jan 5, 2022
Merged

Trampoline #16

merged 14 commits into from
Jan 5, 2022

Conversation

lilactown
Copy link
Owner

@lilactown lilactown commented Dec 17, 2021

Building off of #15, this PR rewrites the essential algorithm to use continuation-passing style and trampoline in order to avoid using the call stack.

On my personal laptop, this results in slighty slower runtime than the one in #15 using the callstack, but descends over 40,000 before overflowing vs a measly ~3,000, and is still faster than the broken version in the main branch.

@lilactown lilactown changed the base branch from main to fix-14 December 17, 2021 20:48
@lilactown lilactown merged commit 0b34fc9 into fix-14 Jan 5, 2022
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.

1 participant