Tag Archives: pfx

Parallel Fx

I read a little bit about the concurrency APIs that will ship with .Net 3.5.  It seems that they are FINALLY making it easy to integrate concurrency into an application without having to worry about locks, threads, etc.  I’m not saying that knowing those low level concurrency programming concepts is a bad thing, but it’s nice to see that there is a super easy way to place concurrency into your program.  I read this article about PFX (Parallel Fx) which shows exccellent examples like the following:

void ParMatrixMult(int size, double[,] m1, double[,] m2, double[,] result)
  Parallel.For( 0, size, delegate(int i) {
    for (int j = 0; j < size; j++) {
      result[i, j] = 0;
      for (int k = 0; k < size; k++) {
        result[i, j] += m1[i, k] * m2[k, j];

Also, I found it very useful to listen to this episode of Hanselminutes where Scott interviews the Steven Toub.  They talk about how MS trying to make parallel computing easier on all levels for .net.  It was interesting to hear that Steven didn’t really think that pfx would help web apps much since they run on a webserver that is already pretty optimized for parallel processes.  I’d be interested in seeing a performance graph that shows site performance using pfx versus not using pfx, against a timeline of requests per second.

It’s safe to say that .net 3.5 is getting me excited about .net programming all over.  I think they’re coming out with some pretty cool things that are sure to make life easier (and probably complicated in new ways as well).