Fight for the Internet 1!

Sunday, April 19, 2009

GCC does everything MSVC does, and more

I came across a very encouraging report on compiler optimizations. I am bringing you some of the selected comparision results between GCC and MSVC. Source for this information is Software optimization resources published by Agner Fog. In particular, I used this PDF, which was last updated January 23, 2009.

The table in the PDF source states these results were from GCC 4.1 and MSVC 2005 which are probably from his original publication in late 2008. However I do not know what updates occured since, so these could be taken from later versions of either compiler. I do not know about MSVC, but I know for sure that GCC 4.2 and 4.3 are just getting faster and faster, and that is not counting LLVM.

One thing this evidence shows is clear: Saying MSVC produces faster binaries than GCC is simply not true, especially if they don't specify compiler versions and platforms and computing task. The next time you hear someone rip on the GCC compiler for being slow without specifics, just laugh in their face.










1 comment:

  1. Well yes it does but entering machine is not like MSVC because you have to do this asm("mov",0x76,%ax) which is nothing MSVC where you do this __asm{mov ax,0x76}
    which is more explanatory and easier to understand.

    ReplyDelete