Parallel programming with .NET

Visual Studio 2010 has some interesting new features, one of which is parallel programming. This simple example, written in C# and F#, tests the difference between serial and parallel computations of Fibonacci numbers. The example uses the System.Threading.Tasks.Parallel.For method. Indeed, there is about a 4-fold improvement on my quad-core multiprocessor for long computations but not for short computations. There is a trade-off between the size of the computation versus the overhead to create, schedule, and synchronize threads.
Continue reading “Parallel programming with .NET”