Performance Comparison: SunStudio vs. GCC on BYTE benchmark (Nbench)
By vtatkar on Sep 26, 2006
I am often asked about performance differences between Sun Studio Compilers and GCC. And whereas with performance, a single answer never works across the board, I am attempting to put out as much comparative information as I can, to show some of the differences (and hopefully advantages over GCC) as I can.
I have announced previous Sun Studio based SPEC World Record numbers in postings here (like this World Record SPECfp number and this mention of SPEC CPU2006 World Records ), and about STREAM (as in here), but these were not comparative numbers (vs GCC), so this is an attempt to fill that gap.
The first attempt is to take BYTE magazine's BYTEmark benchmark programs that are freely available at this location.
The benchmarks are designed to expose the capabilities of a system's CPU, FPU and memory system and were derived directly, without algorithmic change, from the BYTE web site.
The tests used here were ported to Linux and are actually run on a Solaris 10 system . The HW used here was a SunFire X4100 box with a dual-core 2.4GHz Opteron chip in a standard configuration.
In the following tables, the numbers are all Ratios index against a baseline of AMD K6/233 with 512KB L2-cache, gcc18.104.22.168 and libc-5.4.38 system.
Being ratios, Higher number is Better and so also in the Ratio's column, a ratio > 1 means SunStudio is better than GCC
Numeric Sort, FP Emulator, Idea and Huffman are part of Integer Index
String Sort, Bitfield and Assignment make up the Memory Index
The other tests are part of FP Index
Flags used for each were:
Sun Studio11: -fast -xarch=amd64
GCC: -O3 -s -Wall -fomit-frame-pointer -funroll-loops