https://kotlinlang.org logo
#coroutines
Title
# coroutines
p

pniederw

05/03/2017, 11:21 PM
are there any docs on coroutines performance? In particular, I’m trying to understand why nested suspending functions aren’t significantly more expensive than nested future-returning functions, due to the need to recreate the method stack on every resumption.
e

elizarov

05/04/2017, 6:38 AM
pniederw: To give you short summary — they are cheaper than equivalent code based on futures. We don’t recreate stack eagerly (like Quasar) but to it lazily, more like the code you would have written manually if it all was callback or future-based.
3 Views