March 14, 2005 10:46 AM PST

Key open-source programming tool due for overhaul

The entire realm of open-source software could get a performance boost if all goes well with a plan to overhaul a crucial programming tool called GCC.

Almost all open-source software is built with GCC, a compiler that converts a program's source code--the commands written by humans in high-level languages such as C--into the binary instructions a computer understands. The forthcoming GCC 4.0 includes a new foundation that will allow that translation to become more sophisticated, said Mark Mitchell, the GCC 4 release manager and "chief sourcerer" of a small company called CodeSourcery.

"The primary purpose of 4.0 was to build an optimization infrastructure that would allow the compiler to generate much better code," Mitchell said.

News.context

What's new:
A new version of the GNU Compiler Collection, a set of tools used to build nearly all open-source software, is set to debut in the next few months.

Bottom line:
The new compiler software is likely to create programs that are higher quality and faster, meaning that everything from Apache to Linux and Firefox should get a speed boost.

More stories on this topic

Compilers are rarely noticed outside the software development community, but GCC carries broad significance. For one thing, an improved GCC could boost performance for the open-source software realm--everything from Linux and Firefox to OpenOffice.org and Apache that collectively compete with proprietary competitors from Microsoft, IBM and others.

For another, GCC is a foundation for an entire philosophy of cooperative software development. It's not too much of a stretch to say GCC is as central an enabler to the free and open-source programming movements as a free press is to democracy.

GCC, which stands for GNU Compiler Collection, was one of the original projects in the Gnu's Not Unix effort. Richard Stallman launched GNU and the accompanying Free Software Foundation in the 1980s to create a clone of Unix that's free from proprietary licensing constraints.

The first GCC version was released in 1987, and GCC 3.0 was released in 2001. A company called Cygnus Solutions, an open-source business pioneer acquired in 1999 by Linux seller Red Hat, funded much of the compiler's development.

But improving GCC isn't a simple matter, said Evans Data analyst Nicholas Petreley. There have been performance improvements that came from moving from GCC 3.3 to 3.4, but at the expense of backwards-compatibility: Some software that compiled fine with 3.3 broke with 3.4, Petreley said.

RedMonk analyst Stephen O'Grady added that updating GCC shouldn't compromise its ability to produce software that works on numerous processor types.

"If they can achieve the very difficult goal of not damaging that cross-platform compatibility and backwards-compatibility, and they can bake in some optimizations that really do speed up performance, the implications will be profound," O'Grady said.

What's coming in 4.0
GCC 4.0 will bring a foundation to which optimizations can be added. Those optimizations can take several forms, but in general, they'll provide ways that the compiler can look at an entire program.

For example, the current version of GCC can optimize small, local parts of a program. But one new optimization, called scalar replacement and aggregates, lets GCC find data structures that span a larger amount of source code. GCC then can break those objects apart so that object components can be stored directly in fast on-chip memory rather than in sluggish main memory.

"Optimization infrastructure is being built to give the compiler the ability to see the big picture," Mitchell said. The framework is called Tree SSA (static single assignment).

However, Mitchell said the optimization framework is only the first step. Next will come writing optimizations that plug into it. "There is not as much use of that infrastructure as there will be over time," Mitchell said.

One optimization that likely will be introduced in GCC 4.1 is called autovectorization, said Richard Henderson, a Red Hat employee and GCC core programmer. That feature economizes processor operations

CONTINUED:
Page 1 | 2

6 comments

Join the conversation!
Add your comment
Mandrake Linux 10.2 may ship with GCC 4.0
GCC 4.0 is in the Cooker repository which will
soon ship as Mandrake Linux 10.2 Community. Even
if Mandrake elect not to ship it with the main
distribution, it will be trivial to install from
Cooker. This is not pie-in-the-sky, it's landing
as you read this.
Posted by (20 comments )
Reply Link Flag
MDK 10.2: Maybe so, but only as a Developer's tool
This is only a guess, I don't work for MandrakeSoft. But with MDK 10.2 beta-2 now over 10 days old, I expect to see an RC-1 very shortly. It would be INSANITY to "hope" for interoperability between GCC 3.3.x and GCC 4.0.x without a long, long testing cycle. AFAIK, none of the Packages in the betas have been built with GCC 4... and you don't suddenly decide to recompile everything, and "hope", this late in the game.

GCC 4.0.x can and probably will be included for the purpose of Developers compiling their own creations. MDK 9.1, a partial migration from GCC 2.96 to GCC 3.x (Sun Java was 2.9.x, but your other browser plug-ins were generally compiled as 3.x-- OOPS) was the worst MDK version of the last 4 years, due mostly to the 2.9.x/3.x Build conflicts. I told everyone to stay on 9.0, then go directly to 9.2.
Posted by Rick S. (21 comments )
Link Flag
GCC 4.0 test versions included in Fedora Core 3
As the subject says, RPMs for gcc 4.0 are already in the Fedora Core 3 (FC3) distro, in addition to the default gcc-3.4.2.

Incidentally, the upgrade from gcc 3.2/3.3 to 3.4 already provides a significant performance boost both to the kernel and userland in FC3, as compared to earlier Fedora distributions. I'd recommend upgrading to FC3 across the board - that's what I'm doing to all my systems, both server and client desktop.
Posted by (1 comment )
Reply Link Flag
FC3 packages were recompiled?
I've recently downloaded FC3 and installed over my FC1 installation. I've just spent the last two weekends doanloading and installing most all the updated packages available using the Up2Date tool.

I havn't noticed any change in performance from FC1 to FC3, particularly with X applications. I used Gnome for the last year and that window manager has always felt a little sluggish compared to my Windows 2000 installation.

Even though GCC4.0 is available, I'm not sure anything was recompiled with it. I suppose the point of Fedora Core is for end users like myself to take the time to recompile an app and test it. I know so little about X11 and X apps in general; but hey, nows as good a time as any to jump in a learn how to optimize X Server and X apps for speed.

I was seriously considering spending the $400.00 to buy Intel's x86 compiler for Linux, since I know that compiler optimizes code very well for speed on x86 chips. Maybe I'll hold off and see how GCC compares with Intels compiler for speed.
Posted by Richard G. (137 comments )
Link Flag
Patent Issues
Does GCC contain patentable software concepts, and would software compiled with these concepts be infriginging GCC concepts, methods, etc.
It would be funny if all of MS software fit into this basket.
Posted by Stomfi (52 comments )
Reply Link Flag
 

Join the conversation

Add your comment

The posting of advertisements, profanity, or personal attacks is prohibited. Click here to review our Terms of Use.

What's Hot

Discussions

Shared

RSS Feeds

Add headlines from CNET News to your homepage or feedreader.