Cómo mejorar el rendimiento del GCC para x86

La gente dice que el conjunto de compiladores GCC (Colección de Compiladores GNU) no puede generar código eficiente en comparación con otros compiladores sujetos a derechos. ¿Es un mito o una realidad? Intentaremos ver cómo es la cuestión con el GCC. Entonces, ¿cómo podemos hacer que el compilador GCC produzca código más eficiente? Describiremos algunas sugerencias opcionales para compilar "C", "C++" y "Fortran" en plataforma Linux x86 que ayudan a mejorar el rendimiento del GCC.

“Why should I update GCC x86 compiler?” or “GCC compiler performance on Intel® Atom™ from version to version”

      I’ll try to figure out what is new for Intel® Atom™ architecture in new versions of GCC and how this affects performance and code size on the well-known EEMBC® CoreMark®  benchmark:

      The chart below shows CoreMark performance results for base and peak option sets on various GCC versions relative to GCC 4.4.6 base performance (higher is better):

GCC x86 code size optimizations

      The time when programmers did their best to minimize an application code size have gone. The root cause is in significantly increased memory and hard drive sizes on PCs during past several years. The only exceptions are programmers writing code for embedded systems. They usually have tasks like: “You need to develop the particular algorithm. Your program should fit N bytes and use not more than N bytes of memory”. Today phones and tablets move programmers “back to the future”?

GCC x86 performance hints

      People say that GCC (GNU Compiler Collection) cannot generate effective code compared to other proprietary compilers. Is it a myth or reality? We will try to figure out how things really are with GCC. So, how can GCC compiler produce more effective code? We will describe some optional hints for x86 Linux platform "C", "C++" and "Fortran" compilation that help you get more performance from GCC. It should be useful for those customers and developers who need higher performance, but do not use proprietary compilers for various reasons.

Putting -lm Before User Objects/Libraries on Link Line Can Impact Performance

Recommended linking model: icc/icpc/ifort [user objs] [user libs] [sys libs] Using -lm (the GNU math library) prior to user-created objects or libraries causes the GNU libm to be used instead of the Intel math library, impacting performance.
  • Linux*
  • C/C++
  • Fortran
  • Intel® C++ Compiler
  • Intel® Fortran Compiler
  • math
  • library
  • performance
  • static
  • libm
  • libimf
  • GNU
  • -lm
  • Optimization
  • Subscribe to GNU