For those of you who do not read Slashdot, here is a piece of news for you:
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.
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.
Interesting. GCC 4.0 also introduces a feature called “Mudflap,” which allows developers to check for buffer overruns. It slows the program down considerably, but is expected to be turned off in final builds. Some programs are noted to run “shockingly faster” when compiled using GCC 4.0 versus other versions of GCC.
Now for something I didn’t know:
GCC is a very general-purpose compiler. It can handle programs written in languages including C, C++, Java, Fortran, Pascal, Objective-C and Ada. It can generate software for processors including x86 models such as Pentium and Opteron, Sun’s Sparc, Hewlett-Packard’s PA-RISC, IBM’s Power and mainframe processors, Intel’s Itanium, MIPS, ARM, Hitachi’s SuperH and Motorola’s 68000 series.
Previously, I thought that GCC only compiled programs in C, C++, and the like. You can spend years working with Linux and not know what your compiler is capable of doing.
Now if only KDE 4.0 would come out a little faster.