[Mono-bugs] [Bug 652522] New: Parallel.For is 100 times slower than sequential for, at the same time Parallel.For with Partitioner is ok

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Nov 10 00:34:11 EST 2010


https://bugzilla.novell.com/show_bug.cgi?id=652522

https://bugzilla.novell.com/show_bug.cgi?id=652522#c0


           Summary: Parallel.For is 100 times slower than sequential for,
                    at the same time Parallel.For with Partitioner is ok
    Classification: Mono
           Product: Mono: Class Libraries
           Version: SVN
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.Core
        AssignedTo: jbevain at novell.com
        ReportedBy: mariusz.krej at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


User-Agent:       Opera/9.80 (Windows NT 6.1; U; pl) Presto/2.6.30
Version/10.63

Parallel.For (without partitioner) is 200 times slower than sequential for on
4-logical core machines (I've tried on two computers)

  I have runned microsoft's example "ComputePi" 
  (http://blogs.msdn.com/b/pfxteam/archive/2009/12/09/9934811.aspx
   or http://code.msdn.microsoft.com/ParExtSamples)
  on mono 2.9 (from trunk)
  ( Mono 2.8 throws NotImplemented Exception)

  Here are the execution times:
  SerialLinq:
    00:00:16.5024978
  ParallelLinq:
    00:00:26.0804742
  Serial:
    00:00:00.9266276
  Parallel:
    00:03:04.7353892
  ParallelPartitioner
    00:00:00.5463789

  Above values are really strange, parallel version time (3 minutes !) is
slower than serial one, 
  at the same time the new parallel partitioner result is ok

  I've also tried running in .net program compiled on mono
  and results are ok (other computer results):
  SerialLinq:
    00:00:08.5200829
  ParallelLinq:
    00:00:02.6109864
  Serial:
    00:00:02.2807189
  Parallel:
    00:00:01.2737228
  ParallelPartitioner
    00:00:00.7517575


Reproducible: Always

Steps to Reproduce:
1. run 'ComputePi' Microsoft's parallel example
   (http://code.msdn.microsoft.com/ParExtSamples)

Actual Results:  
(approximately)
  00:00:16.5024978
  00:00:26.0804742
  00:00:00.9266276
  00:03:04.7353892
  00:00:00.5463789

Expected Results:  
(approximately)
 00:00:08.5200829
 00:00:02.6109864
 00:00:02.2807189
 00:00:01.2737228
 00:00:00.7517575

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list