Tag Archives: code generation

Compiler Bugs Found When Porting Chromium to VC++ 2015

Moving a big software project to a new compiler can be a lot of work, and few projects are bigger than Chromium. In addition to the main Chromium repository, which includes all of Blink, there are over a hundred other … Continue reading

Posted in Programming, Visual Studio | Tagged , , , | 34 Comments

std::min Causing Three-Times Slowdown on VC++

Using macros to implement Min and Max has numerous well known pitfalls that can be avoided by using template functions. However the definitions of min and max that are mandated by the C++ standard cause VC++ to generate inefficient code. … Continue reading

Posted in Performance, Programming, Visual Studio | Tagged , | 47 Comments

Comparing Memory is Still Tricky

One of my “favorite” code-gen peculiarities in Visual Studio (VS) 2010 is its inconsistent handling of memcmp. VS 2010 had a really nice optimization that could generate faster and smaller code, but it only used the optimization if you lucked … Continue reading

Posted in Performance, Programming, Visual Studio | Tagged , , , | 10 Comments

Visual C++ Code-gen Deficiencies

Sensible programmers never (well, hardly ever) write assembly language anymore which means that we are at the mercy of our compilers and must trust them to wisely translate our high-level directives into machine code. Most compilers produce good code most … Continue reading

Posted in Performance, Programming, Visual Studio | Tagged , | 7 Comments