More on compiler options, this time with long integers

When I wrote earlier this week about amd64 compiler performance was all done with the unsigned int. I figured for a laugh this evening that I'd see what I got by using unsigned longs instead.

It's interesting. In both case below (testing the first million natural numbers) the compiler options differ by ---xarch=amd64. The consistent options were ---fast ---xlibmil ---xlibmopt

Data ModelWallclock time
32bit12.81sec
64bit21.74sec

This I find rather strange. Why is it that longs in 64bit mode make execution nearly 6 seconds longer?

Comments:

Under ILP32, longs are 32-bit, under LP64, longs are 64-bit. So, you need more memory bandwidth under LD64 as the data structures are larger.

Posted by Rayson on April 07, 2005 at 05:22 PM EST #

Aha! Good point to check.

My laptop and workstation at home are both athlon64 with the low-end socket 754.

I just re-ran the tests on a v40z here in the lab.

The 64bit app using ints took 58.09sec. The 32bit app using longs took 9.84sec and the 64bit app using longs took 46.93sec.

I can see this is going to keep me amused for at least another 5 minutes... ;)

Posted by James McPherson on April 08, 2005 at 01:46 AM EST #

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