How to get the most out of your CPU with Sun Studio 12

There used to be a time when hardware (especially CPUs) had a much longer release cycle compared to software. Not anymore. The silicon industry has joined the "frenetic squirrel" squad and cranks up updates of architectures at a pretty alarming pace. Of course, for C, C++ and Fortran developers it means only one thing -- your compilers have to stay ahead of the game, otherwise you might as well program that shiny new CPU in an assembly language.

The good news for Sun Studio 12 users is that the only thing that separates you from the kick ass performance on the latest contraptions from AMD and Intel is this set of patches. So, if you are planning to deploy on Intel's Woodcrest and Clovertown or AMD's Barcelona chips, just download the patches, install them and don't forget to tell the compiler what you want:
  1. if your development and deployment boxes are the same:-xtarget=native
  2. same as above, but forcing 64bit code generation:-xtarget=native64
  3. if your target is Intel's Woodcrest and Clovertown in 32bit mode:-xtarget=woodcrest -m32
  4. if your target is Intel's Woodcrest and Clovertown in 64bit mode:-xtarget=woodcrest -m64
  5. if your target is AMD's Barcelona in 32bit mode:-xtarget=barcelona -m32
  6. if your target is AMD's Barcelona in 64bit mode:-xtarget=barcelona -m64
Comments:

Thank you Roman!

I'm going to test this on several processors to benchmark some custom builds of squid, apache, bind, freeswitch and asterisk! wish me luck and I'm guessing this also applies to the linux port of Sun Studio :D.

Keep these hints comming, the sun studio documentation is good but these practical tips is what we need!

Tomas Gayoso

Posted by Tomas Gayoso on February 26, 2009 at 01:59 PM PST #

Best of luck ;-) Yes, the optimizations are supposed to be the same on Linux. To the extent that the system libraries
there let us keep them the same (math lib, for example is less optimized on linux, etc.).

And thanks for the nice comment ;-)

Roman.

Posted by Roman V. Shaposhnik on February 27, 2009 at 08:53 AM PST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

rvs

Search

Top Tags
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