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

GCC 4.7 Link-Time Optimization Performance

Michael Larabel

Published on 21 August 2012
Written by Michael Larabel
Page 1 of 3 - 17 Comments

With the recent interest regarding Link-Time Optimization support within the Linux kernel by GCC, here are some benchmarks of the latest stable release of GCC (v4.7.1) when benchmarking several common open-source projects with and without the performance-enhancing LTO compiler support.

This article, which spawned out of the many LTO comments from the Linux kernel link-time optimization article, has a few benchmarks conducted since then from an Intel Ivy Bridge system. More GCC LTO benchmarks will come in a future article. GCC's Link-Time Optimization support allows for creating faster generated binaries at the cost of increased compile times and greater system memory (RAM) usage. When building software with the performance-oriented feature, link-time optimizations are applied on recent versions of the GNU Compiler Collection that allow for in-lining of functions between different files, performing various compile-time optimizations across the binary as a whole, dropping dead code, and running entire checks across the whole binary rather than just individual files.

As explained on the GCC Wiki, "Link Time Optimization (LTO) gives GCC the capability of dumping its internal representation (GIMPLE) to disk, so that all the different compilation units that make up a single executable can be optimized as a single module. This expands the scope of inter-procedural optimizations to encompass the whole program (or, rather, everything that is visible at link time)...The fundamental mechanism used by the compiler to delay optimization until link time is to write the GIMPLE representation of the program on special sections in the output file. For the initial implementation on the branch, ELF was chosen as the container format for these sections, but in GCC-4.6 support has been added on the trunk for PE-COFF and Mach-O. In order to use LTO the target must support one of these binary formats."

Using GCC LTO requires passing "-flto" compiler flag to enable the main Link-Time Optimization features. There's also a "-fwhopr" that is similar to "-flto" but splits compilation to achieve scalability for very large code-bases that cannot fit all in memory at once.

For this quick GCC 4.7.1 LTO benchmarking, the Intel Core i7 3517UE "Ivy Bridge" system was running Ubuntu 12.10 x86_64 with GCC 4.7.1 from the Ubuntu Quantal repository and then running several common computational test profiles with and without the "-flto" compiler flag. All other CFLAGS/CXXFLAGS options were maintained the same throughout the testing process. This benchmarking was handled in a fully automated manner using the open-source multi-platform Phoronix Test Suite software.

<< Previous Page
1
Latest Linux Hardware Reviews
  1. 13-Way Low-End GPU Comparison With AMD's AM1 Athlon
  2. ASUS AM1I-A: A Mini-ITX Board For Socketed Kabini APUs
  3. Mini-Box M350: A Simple, Affordable Mini-ITX Case
  4. Overclocking The AMD AM1 Athlon & Sempron APUs
Latest Linux Articles
  1. Ubuntu 12.04.4 vs. 13.10 vs. 14.04 LTS Desktop Benchmarks
  2. AMD OpenCL Performance With AM1 Kabini APUs
  3. A Quick Look At GCC 4.9 vs. LLVM Clang 3.5
  4. Are AMD Athlon/Sempron APUs Fast Enough For Steam On Linux?
Latest Linux News
  1. Getting Hit By The Variable Performance Of The Public Cloud
  2. Git 2.0 Test Releases Begin With Many Changes
  3. Wine 1.7.17 Works On Its Task Scheduler, C Run-Time
  4. The Improv ARM Board Still Isn't Shipping; Riding A Dead Horse?
  5. Debian To Maintain 6.0 Squeeze As An LTS Release
  6. Wasteland 2 Is Finally Released For Linux Gamers
  7. FreeBSD Advances For ARM, Bhyve, Clang
  8. Ubuntu 14.04 LTS "Trusty Tahr" Officially Released
  9. Ubuntu 12.04 LTS vs. 14.04 LTS Server Benchmarks
  10. QEMU 2.0 Released With ARM, x86 Enhancements
  11. Running The Unity 8 Preview Session On Ubuntu 14.04 LTS
  12. R600 Gallium3D Disables LLVM Back-End By Default
Latest Forum Discussions
  1. Suggestions about how to make a Radeon HD 7790 work decently?
  2. The GNOME Foundation Is Running Short On Money
  3. Updated and Optimized Ubuntu Free Graphics Drivers
  4. Radeon 8000M problematic on Linux?
  5. Linux Kernel Developers Fed Up With Ridiculous Bugs In Systemd
  6. After Jack Keane, RuseSoft will briing Ankh 3 to Linux through Desura
  7. Suspected PHP Proxy Issue
  8. Change installation destination from home directory