pi icon indicating copy to clipboard operation
pi copied to clipboard

Add coroutines

Open elgopher opened this issue 2 years ago • 1 comments

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 avatar Aug 24 '23 22:08 elgopher

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

elgopher avatar Aug 25 '23 18:08 elgopher