Remember new features, that make your code unreadable? A couple of days ago, CLR team released first preview of Parallel Computing for .NET. Isn't it really cool, that now you can use full power of your computer? I decided to test the extension and wrote simple routine, that throttles your CPU.
static int i=0;
static void MessMe()
Cool, now let's run it (with measurement) on my Dual Core 2 processor.
Nice, 54K simple math operations per second with half of each of my cores
It's already works (maybe because of my super OS?), but I still did not used it. Let's try to use the Parallel Computing extension.
What's going on with CPU?
Looks the same? Probably. Now the question is why the application performance degraded? Maybe it should know how much cycles I need?
And now with the Extension
Well, not really works. Let's try another method
Parallel.For(1, int.MaxValue, delegate(int k)
i = k;
Hmmm, it looks much better now, but still I do not understand that's going on here.
Yes, I know, this is stupid way to test framework and it's very early stage to judge, however, please someone can explain me what exactly wrong I'm doing?
Download Parallel Computing December CTP