Lots of low hanging fruit in Phobos
Peter Alexander
peter.alexander.au at gmail.com
Sun Mar 9 04:00:12 PDT 2014
On Sunday, 9 March 2014 at 10:30:37 UTC, bearophile wrote:
> w0rp:
>
>>> 3. Give up on maximum performance (fiber-based coroutine
>>> range)
>>
>> I think that's what I would go for.
>
> Yet there's no need for that. You can have your pie and eat it
> too, with a small cost. D can rewrite code that contains a
> yield in an efficient finite state machine (this is what
> ShedSkin compiler for Python does, and perhaps the C# compiler
> does the same).
How does this handle recursive generators, e.g. like you would
see with a depth-first tree traversal? The "state" in this case
is a call stack. How is the memory allocated for the stack?
More information about the Digitalmars-d
mailing list