[Mono-dev] Mono Continuations and MicroThreads

Tomi Valkeinen tomba at bat.org
Fri Apr 21 02:48:20 EDT 2006


Hi,

> If you want to improve performance you could start by replacing the 
> LinkedList which seems to be overkill. I think you could get along with a 
> singly linked list without listnode-classes for each microthread which should

I have three lists for threads, for scheduled, waiting and sleeping 
threads. I have to move the threads from one list to another. So an array 
based list is a bad choice. But perhaps a singly linked list would do the 
job, as you suggested, perhaps each MicroThread object having a pointer to 
the next thread. That wouldn't be a beautiful implementation, but perhaps 
the benefits would overweight that.

> make it a little faster and use much less memory. Also using foreach is 
> resulting in the creation of an iterator and I think you don't need it.

Which foreach are you referring to? There is one in ManageSleepers(), but 
the whole sleeping system is lousy implementation and should be rewritten.

> What would be cool is to implement the continuations in unsafe managed code.

Do you have ideas how this could be implemented? I don't think you can 
access stack pointer and processor registers from managed code, and that 
is what the native implementation does.

Thanks for feedback!

  Tomi




More information about the Mono-devel-list mailing list