Iterators for D
Sean Kelly
sean at f4.ca
Wed Nov 8 10:06:01 PST 2006
Daniel Keep wrote:
>
> I suppose the bottleneck (if it is one) is how fast you can do
> user-space context switches. Which is basically a function call, moving
> the base of the stack, and switching over stuff like the exception
> handling registers. Or somesuch... Mikola Lysenko wrote StackThreads;
> my attempt only mostly worked :P
That's pretty much it. Saving the current register data, loading the
other register data, and jumping to a new instruction address. There's
no way this can be as efficient as an integer increment instruction (for
loop iteration) but it's orders of magnitude faster than a kernel thread
context switch.
Sean
More information about the Digitalmars-d
mailing list