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

Hybrid call stack #202

Merged
merged 1 commit into from
Nov 7, 2023
Merged

Hybrid call stack #202

merged 1 commit into from
Nov 7, 2023

Conversation

sorpaas
Copy link
Member

@sorpaas sorpaas commented Nov 7, 2023

This adds a stack call stack alongside a heap call stack. Heap call stack is interruptible, slower, but handles really deep calls. Stack call stack must have its interrupt set to Infallible, and is faster, but can only handle shadow calls due to stack size limit. We therefore use a hybrid method:

  • When the depth is low, use stack call stack for faster speed.
  • As the depth grows, at heap_depth, switch to heap call stack.

@sorpaas sorpaas merged commit 2337db3 into next Nov 7, 2023
2 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.

1 participant