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. Scythe Mugen MAX
  2. Intel Core i7 5960X Haswell-E On Linux
  3. Intel 80GB 530 Series M.2 SSD On Linux
  4. With A New Motherboard, The Core i7 5960X Haswell-E Lights Up
Latest Linux Articles
  1. 7-Way Linux Desktop Gaming Comparison On Ubuntu 14.10
  2. Intel P-State vs. CPUFreq Benchmarks On The i7-5960X
  3. RadeonSI GLAMOR Benchmarks With X.Org Server 1.16
  4. RadeonSI Gallium3D vs. Catalyst At 4K UHD On Linux
Latest Linux News
  1. FreeBSD 10.1 Has The New VT Driver, Hardware Improvements
  2. AntiMicro 2.6 Yields Greater Compatibility For Gamepads On Linux
  3. OpenGL 3.3 / GLSL 3.30 Lands For Intel Sandy Bridge On Mesa
  4. AMD's RadeonSI Gallium3D Driver Sees Some Improvements
  5. Mesa 10.3 Released With The Latest Open-Source GPU Driver Improvements
  6. GNOME 3.13.92 Officially Released
  7. Wine 1.7.27 Is Still Working Towards Direct2D Support
  8. Wasteland 2 Officially Launched Today, Including For Linux Gamers
  9. Tropico 5 Launches On Steam For Linux
  10. The Intel Core i7 5960X Continues Running Great On Linux
Latest Forum Discussions
  1. X.Org Women Outreach Program Only Turns Up Two Applicants So Far
  2. Glamor now enabled in Debian radeonsi
  3. SSD seems slow
  4. New stress testing utility for GPU's
  5. New Group Calls For Boycotting Systemd
  6. It's Now Possible To Play Netflix Natively On Linux Without Wine Plug-Ins
  7. Stop grabbing my keyboard :(
  8. ASRock AM1H-ITX: One Of The Best AM1 Mini-ITX Motherboards