[Mono-bugs] [Bug 652522] 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
Fri Nov 12 12:37:54 EST 2010


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

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


--- Comment #2 from Jérémie LAVAL <jeremie.laval at gmail.com> 2010-11-12 17:37:53 UTC ---
On a side note, the (P)Linq query is mostly hindered by the implicit creation
of an anonymous type with the let operator. If you rewrite the query like this:

ParallelEnumerable.Range (0, num_steps).Select ((i) => { var x = (i + 05) *
step; return 4.0 / (1.0 + x * x); }).Sum () * step;

You get a more normal run time.

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