Sun Studio 10 compiler options for amd64

amd64 Compiler Options

One of the nifty things about Sun Studio 10 is that it includes a code generator for 64bit operation on amd64 (and ia32e) chips. I thought I'd see what results I could get when compiling my programming assignment in 64bit mode

All results below are from using timex(1) for the first million natural numbers.

ModelOptions usedsize(bytes)runtimespeedup(percent)
32bitnone82602m 17.20sec
32bit---xlibmil ---xlibmopt ---native79481m 45.85sec22.9
64bit---fast ---xarch=amd64 ---xlibmil1024016.46sec88.0
64bit---fast ---xarch=amd64 ---xlibmil ---xlibmopt1024815.79sec88.5
WOW! So what does the gcc (v3.4.3) that Sun supplies with Solaris 10 and Solaris Express give me?
ModelOptions usedsize(bytes)runtimespeedup(percent)
32bitnone82601m 38.64sec
32bit---O385881m 10.93sec28.1
32bit---O3 ---march=opteron862058.42sec40.8
64bit---O3 ---m64 ---march=opteron1096837.47sec62.0
64bit---O5 ---m64 ---march=opteron1096837.48sec62.0
It's all very interesting. gcc is frequently used in HPC environments, one result of the popularity of linux-based supercomputers and no vendor compilers. Another thing that gcc is known for is darned good code generation on ia32 and suboptimal code on sparc (in some cases). I was surprised to see the gcc results above. Perhaps a gcc-savvy reader could suggest some more command line options which match Sun Studio's ---fast etc. I'm keen to find out.
Comments:

Post a Comment:
Comments are closed for this entry.
About

I work at Oracle in the Solaris group. The opinions expressed here are entirely my own, and neither Oracle nor any other party necessarily agrees with them.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today