| > Automatic parallelisation is a bad idea because the overhead caused by synchronisation is bigger than the gain. A sufficiently intelligent compiler would be able to heuristically determine if the synchronization overhead for a program segment would be greater than the performance gain. Plus, there's lots of little cases where synchronization overhead is trivial, like map(). C isn't the best language for this, but there's plenty of languages (e.g. Haskell) that have data flows that can be thoroughly statically analyzed for dependencies. > It's also a bad idea to take away control from the programmer. Ideally you'd have compiler pragma to disable this on a case by case basis, and you'd still have more traditional parallel programming tools available. > What if every compiler did automatic parallelisation differently? Then you'd have impossible to fix performance problems. If you had a bad enough performance regression, you'd disable automatic parallelization and file a compiler bug (because it shouldn't regress below single-core performance). You could make this same argument against any optimizing compiler. They all apply different optimizations, and do sometimes lead to "impossible" to fix performance problems or even contradictory execution behaviors between implementations. But I still think `gcc -03` is invaluable. I don't think automatic parallelization is a cure-all, or even that it should be enabled by default on compilers any time soon, but it's better to have it as an option than not. |