Auto-Threading Compilers Could Be Missing Link In Performance and Efficiency Gains For Multi-Core Systems

Want to scare the life out of a programmer friend? Just utter the words "multi-threading" into their ear - it works every time! Alright - that's a bit of an exaggeration, but writing multi-threaded code is one of the biggest challenges a programmer can ever face. The reason boils down to the fact that for the longest time, everyone wrote code that best-suited single-core processors - which just happened to get faster every year.

When we reached the peak of processor frequency a number of years ago, multi-core processors became the only way to move forward. While these CPUs are excellent for getting big jobs done fast, they've proven to be a nightmare for programmers who have to spend a lot of time deciding exactly how to multi-thread their application - it's much easier said than done. Even if a programmer intricately understands how a CPU operates and handles the multitude of threads that an app will present, optimizing is a time-consuming process and rarely "perfect".

It's for these reasons that auto-threading compilers are intriguing. Imagine not having to adjust how you write your code in order to appease the multi-threading gods, but rather be able to write sequential code as you've always done. In many ways, the idea of an auto-threading compiler is a pipe dream, but it's a challenge many have been working on, including Intel and Microsoft. Intel's latest compiler offers some auto-threading functionality, although I'm not personally aware of how useful or accurate it is - made worse by the fact that I don't have a single programmer friend who uses Intel Compiler (due to the fact that it's an additional large fee on top of other coding tools).

Nonetheless, as Tim Kellogg over at Dr. Dobb's has reported, Microsoft has been hard at work on its own auto-threading compiler that it's designing as an extension to its C# programming language. Taking advantage of the concept of Reference Immutability, this compiler is designed to track mutability in code and understand what can and cannot be threaded. It sounds simple on the surface, but for it to work, the code would have to be extremely complex - it has to be in order to properly handle unknown errors that could creep in that could potentially result in corrupt memory data or other inefficiencies.

Unfortunately, Microsoft doesn't have a release date for this auto-threading compiler, and sadly, it looks to remain C#-specific upon its release. Of course, pricing hasn't been unveiled either, but you can be sure it'll carry a price-tag comparable to other programming tools the company offers. But for many, if the auto-threader works as advertised, a license cost should be of little concern.