Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Joe Duffy, Huseyin Yildiz, Daan Leijen, Stephen Toub - Parallel Extensions: Inside the Task Parallel
Mar 21, 2008 at 2:50 PMObviously the overhead from switching threads is too high for such a simple task. After adding more demanding calculations to PFib, TPL's advantage becomes obvious.
Good job TPL team!
Joe Duffy, Huseyin Yildiz, Daan Leijen, Stephen Toub - Parallel Extensions: Inside the Task Parallel
Mar 21, 2008 at 6:50 AMWell, at least one parallel test was indeed faster, by factor 1.5 (on matrix sizes bigger than 2000x2000):
private static double[,] MultP(int w, int h)
{
double[,] m1 = new double[w, h];
Parallel.For(0, w, x =>
{
Parallel.For(0, h, y =>
{
m1[x, y] = x * y * 1000.0;
});
});
Parallel.For(0, w, x =>
{
Parallel.For(0, h, y =>
{
m1[x, y] = Math.Sqrt(m1[x, y]);
});
});
return m1;
}
May be enclosed FORs are easier to parallelize. Similar vector tests are 1.5 - 2 times slower.
Something is completely wrong with PFib case. TPL is 90 times slower.
Memory consumption is an issue with all parallel tests.
Joe Duffy, Huseyin Yildiz, Daan Leijen, Stephen Toub - Parallel Extensions: Inside the Task Parallel
Mar 20, 2008 at 7:05 AMI've tried the PFib function from the video and its parallel version is several times slower than its sequential sibling on Dual Core XP machine, December CTP TPL. The console app created 29 threads, and used huge chunk of memory.
Also Parallel.For was 1.5 - 2 times slower on simple bulky array operations.
Do I need at least QCore to see advantages?