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

Add coroutines #97

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Add coroutines #97

wants to merge 1 commit into from

Conversation

elgopher
Copy link
Owner

@elgopher elgopher commented Aug 24, 2023

Try to implement cheap Lua-like coroutines.

  • it should be fast to create and resume coroutine (~50ns for creation?, ~10ns for resume?)
  • it should not allocate much

If coroutines are to heavy then use iterators.

@elgopher elgopher force-pushed the coroutines branch 11 times, most recently from 70450f4 to 955a94f Compare August 25, 2023 18:09
@elgopher
Copy link
Owner Author

elgopher commented Aug 25, 2023

Looks like iterators are ~2 order of magnitues faster. They are much harder to use though.

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