Multi-Process vs. Multi-Threaded Python Performance

Interesting benchmarks in PEP 371 – Addition of the Processing module to the standard library. In short, standard Python threads perform worse than non-threaded in almost every benchmark, while the multi-process Processing module generally does as you’d expect and reduces processing time proportional to the number of processors / cores.

You could argue this just means Python has a crappy thread implementation or that the benchmarks are biased, but it’s interesting. I actually have an occasion for a multi-headed app, so perhaps I’ll give Processing a try.

Via Doug Hellmann.