Yet another strike against the current AA implementation

Joel C. Salomon joelcsalomon at gmail.com
Tue Apr 28 10:20:00 PDT 2009


grauzone wrote:
> downs wrote:
>> Daniel Keep wrote:
>>> Here's an excellent reason to use ranges over opApply: you
>>> can't define zip with opApply.  Because opApply uses inversion of
>>> control, you can't use more than one without bringing threads into the
>>> equation.
>>
>> Your point stands, of course, but I just wanted to mention that
>> stackthreads/fibers work too and have far less overhead.
> 
> First, don't they have LOTS of memory overhead, because each fiber needs
> a new/separate stack?

A fiber-specific stack needn’t be very large. A few KB is often enough
even for long-running threads; if the call stack is only going to be a
few levels deep you might get away with a few hundred bytes each.

—Joel Salomon



More information about the Digitalmars-d mailing list