Sunday, 13 December 2009

Deprecate Compiler Option Og

We made some interesting discoveries concerning deprecated compiler options.

Between Visual C++ 2003 and Visual C++ 2005 Microsoft made a number of changes. One of which was a range-check to the vector operator[]. This means that every call to operator[] includes a check that the argument is within the range of the vector, which slows things down. But there are ways to remove this check. The second change was that Og optimizer flag was deprecated. This flag made the MS C++ compiled code almost as fast as our Intel C++ code. Fortunately Visual Studio 2010 still supports this flag.

I am in contact with Microsoft to determine what will replace Og.