Entries:
Comments:
Posts:

Loading User Information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading User Information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

boomeranda

boomeranda boomeranda

Niner since 2008

  • Joe Duffy, Huseyin Yildiz, Daan Leijen, Stephen Toub - Parallel Extensions: Inside the Task Parallel

    boomeranda wrote:
    Did anyone try to benchmark these TPL examples?
    I'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. <= it's not because of PFib

    Also Parallel.For was 1.5 - 2 times slower on simple bulky array operations.

    Do I need at least QCore to see advantages?


    Obviously 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

    Well, 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

    Did anyone try to benchmark these TPL examples?
    I'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?