Re: can delegating yield be as fast as a normal function call?

2014-02-20 Thread Andy Wingo
Hi, This isn't really an es-discuss topic, as it is about performance of implementations rather than the language itself. On Wed 12 Feb 2014 18:08, Jelle van den Hooff je...@vandenhooff.name writes: Do the delegating yield semantics allow a VM to transform nested yield* calls into normal

Re: can delegating yield be as fast as a normal function call?

2014-02-20 Thread David Bruant
Le 20/02/2014 15:03, Andy Wingo a écrit : Hi, This isn't really an es-discuss topic, as it is about performance of implementations rather than the language itself. Stating my own opinion only on behalf of myself: I think this thread appropriate for es-discuss. How developers use the language

can delegating yield be as fast as a normal function call?

2014-02-12 Thread Jelle van den Hooff
I would like to write taskjs coroutines, but I don't want to worry about what functions might yield. Instead, I plan to allow any function to yield by rewriting all my function calls to delegating yield: Before: function fetch_url(url) { return yield create_promise_for_url(url); // will