[Mono-dev] Mono Continuations and MicroThreads

Andreas Nahr ClassDevelopment at A-SoftTech.com
Thu Apr 20 18:20:44 EDT 2006


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 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.
What would be cool is to implement the continuations in unsafe managed code. 
However it is extremely hard to predict the performance effects of that 
(Although the findings from the Microsoft Singularity Project might suggest 
this could happen with comparable performance). On the one hand your C 
implementation is probably considerably faster, on the other hand internal 
calls are pretty expensive and obviously the managed-native boundry is a 
hard (impassable?) barrier for any JIT optimizations.


> Hi,
> I made some more optimizations and I finally beat stackless python in the 
> yield test. Almost 3.5M yields/s if ran with inline-optimizations, when 
> the old result was 1.6M. http://bat.org/~tomba/monoco.html has updated 
> source and benchmarks.
> What comes to getting continuations to official mono, I think the 
> implementation is quite far from being ready for that. There are million 
> things to do before the implementation is usable for everyone, and most 
> importantly, the continuations will need a lot of testing before I trust 
> that they actually work...
> But I do hope that some people will try them out, perhaps even improving 
> something. Test programs would be especially nice, and benchmarks both in 
> C# and stackless python.
>  Tomi
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list

More information about the Mono-devel-list mailing list