Linux Gazette: Optimizing GCC | Linux Today

Linux Gazette: Optimizing GCC

Written By
Web Webster
Web Webster
Mar 4, 2003

[ Thanks to Justin
Piszcz
for this link. ]

“I have a Pentium 3 866MHZ CPU. After reading the freshmeat
article on optimizing GCC a few days ago, it got me thinking. So I
posed the following question: How much faster would gcc compile the
kernel if gcc itself was optimized? I chose to benchmark kernel
compilation times, because I think it is a good benchmark, and many
other people also use it to benchmark system performance. Also, at
one point or another, most Linux users will have to take the step
and compile the kernel, so I thought I’d benchmark something that
is useful and something that people have a general idea of how long
it takes to compile without optimizations. So my test is comprised
of the following:

  1. “Run 10 kernel compilations and calculate the average time.
    • Regular GCC build.
    • Optimized GCC build.
  2. “The kernel in question is the latest stable Linux kernel.
    • At this time, 2.4.20 remains the latest stable Linux
      kernel.
  3. “The GCC used with this test is the latest stable gcc.
    • At this time, 3.2.2 remains the lastest stable gcc.

Complete
Story

Web Webster

Web Webster

Web Webster has more than 20 years of writing and editorial experience in the tech sector. He’s written and edited news, demand generation, user-focused, and thought leadership content for business software solutions, consumer tech, and Linux Today, he edits and writes for a portfolio of tech industry news and analysis websites including webopedia.com, and DatabaseJournal.com.

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.