Skip to content

Add coroutines #97

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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.

@elgopher elgopher force-pushed the coroutines branch 2 times, most recently from 4cc5a39 to ae8a598 Compare August 26, 2023 09:12
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant