1. Computers
  2. Display Drivers
  3. Graphics Cards
  4. Memory
  5. Motherboards
  6. Processors
  7. Software
  8. Storage
  9. Operating Systems


Facebook RSS Twitter Twitter Google Plus


Phoronix Test Suite

OpenBenchmarking.org

The Performance Between GCC Optimization Levels

Michael Larabel

Published on 13 October 2012
Written by Michael Larabel
Page 1 of 5 - 23 Comments

For those that have never benchmarked the performance differences between GCC's different optimization levels, here are some recent test results comparing the performance differences when using an AMD FX-8150 processor with GCC 4.7.2.

These are just some straightforward benchmarks to share showing the performance differences of GCC 4.7.2 from the AMD FX-8150 Bulldozer system when changing out the optimization flags and then having the Phoronix Test Suite re-build the tests each time followed by letting it do its automated benchmarks.

For those unfamiliar with the different optimization flags, see the GCC optimize options documentation. The tested flags used in this article include:

-O0 - Reduce compilation time and make debugging produce the expected results. This is the default.

-O1 - Optimize. Optimizing compilation takes somewhat more time, and a lot more memory for a large function.

-O2 - Optimize even more. GCC performs nearly all supported optimizations that do not involve a space-speed tradeoff. As compared to -O, this option increases both compilation time and the performance of the generated code.

-O3 - Optimize yet more. -O3 turns on all optimizations specified by -O2 and also turns on the -finline-functions, -funswitch-loops, -fpredictive-commoning, -fgcse-after-reload, -ftree-vectorize, -fvect-cost-model, -ftree-partial-pre and -fipa-cp-clone options.

-Os - Optimize for size. -Os enables all -O2 optimizations that do not typically increase code size. It also performs further optimizations designed to reduce code size.

-Ofast - Disregard strict standards compliance. -Ofast enables all -O3 optimizations. It also enables optimizations that are not valid for all standard-compliant programs. It turns on -ffast-math and the Fortran-specific -fno-protect-parens and -fstack-arrays.

Only the generated binary performance is being compared in this article and not focusing upon the compilation time (though there is one result shared in this article of the PHP compilation time) or generated binary size.

<< Previous Page
1
Latest Linux Hardware Reviews
  1. AMD R600g/RadeonSI Performance On Linux 3.16 With Mesa 10.3-devel
  2. Intel Pentium G3258 On Linux
  3. SilverStone Precision PS10
  4. ASRock Z97 Extreme6
Latest Linux Articles
  1. Nouveau vs. Radeon vs. Intel Tests On Linux 3.16, Mesa 10.3-devel
  2. KVM Benchmarks On Ubuntu 14.10
  3. X.Org Server 1.16 Officially Released With Terrific Features
  4. Ubuntu With Linux 3.16 Smashes OS X 10.9.4 On The MacBook Air
Latest Linux News
  1. FreeBSD Developing A New Automounter, Other Features
  2. Guix 0.7 Can Now Install The GNU Operating System
  3. X.Org Foundation Still Works Towards Becoming An SPI Project
  4. Open-Source AMD Hawaii Support Should Now Be Working!
  5. KDE Developers Continue Working Toward Wayland Support
  6. Ubuntu 14.04.1 LTS Released
  7. Linux Developers Jump Quickly On ACPI 5.1, Helps Out ARM
  8. Pkg 1.3.0 Released To Improve Package Management On FreeBSD
  9. GOG.com Officially Starts Rolling Out Linux Games
  10. Fedora 21 Has Been Delayed By Three Weeks
Latest Forum Discussions
  1. Updated and Optimized Ubuntu Free Graphics Drivers
  2. AMD "Hawaii" Open-Source GPU Acceleration Still Not Working Right
  3. Radeon related kernel bug??
  4. how the US intellegentia operates:
  5. AMD Publishes Open-Source Linux HSA Kernel Driver
  6. Next-Gen OpenGL To Be Announced Next Month
  7. Open-Source Radeon Performance Boosted By Linux 3.16
  8. Remote gui not accessible in Phoronix Test Suite 5.2