Monday, December 03, 2007 7:57 PM
Software is sucks? Probably it really is!
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
תגים:WPF, tutorial, Performance, source, thoughts, C#, .NET 3.5