The Source for Java Technology Collaboration

Home » java.net Forums » Performance » General Performance Discussion

Thread: 64-bit double math performance

Welcome, Guest Help
Login Login
Guest Settings Guest Settings
This question is not answered. Helpful answers available: 2. Correct answers available: 1.

Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 9 - Last Post: Sep 11, 2007 2:12 AM by: sumavalluru Threads: [ Previous | Next ]
edwardx21

Posts: 1
64-bit double math performance
Posted: Jul 19, 2007 3:48 PM
 
  Click to reply to this thread Reply

I have a science application that uses double math almost exclusively for some pretty heavy duty and long-running analyses.

I thought that by using a 64-bit OS and Java VM I would naturally see about a 2x performance boost, but this is NOT the case. Performance actually degrades a bit, as the Sun 64-bit FAQ explains is due to increased pointer size.

Why is there no performance increase for double math on the 64-bit VM? Doubles are 64 bit in size and the underlying 64 bit machine has a 64 bit data path. I would imagine that there is now one memory fetch per value rather than two.

What is going on here?

linuxhippy

Posts: 646
Re: 64-bit double math performance
Posted: Jul 20, 2007 3:18 AM   in response to: edwardx21
 
  Click to reply to this thread Reply

I don't know which platform you are running on, but I guess its AMD64.
Well the whole SSE2-stuff is the same running in 32 or 64-bit mode so, well, there simply is no reason why it should be faster or slower (from the FP point of view).

lg Clemens

schumnana

Posts: 1
Re: 64-bit double math performance
Posted: Jul 20, 2007 3:39 AM   in response to: edwardx21
 
  Click to reply to this thread Reply

I make some benchmarks between JVM 64 and 32 on my Ubuntu Feisty 64 bits (with a Core 2 Duo) and I see an improvement on arithemetic operations (+; -, *, /). I don't remember exactly, but I think it is 30% or 40%).

I'm a quite surprised of your post.

linuxhippy

Posts: 646
Re: 64-bit double math performance
Posted: Jul 20, 2007 7:37 AM   in response to: schumnana
 
  Click to reply to this thread Reply

> I make some benchmarks between JVM 64 and 32 on my
> Ubuntu Feisty 64 bits (with a Core 2 Duo) and I see
> an improvement on arithemetic operations (+; -, *,
> /). I don't remember exactly, but I think it is 30%
> or 40%).
Floating Point or Integer arithmetik?

lg Clemens

entzik

Posts: 7
Re: 64-bit double math performance
Posted: Jul 20, 2007 5:14 AM   in response to: edwardx21
 
  Click to reply to this thread Reply

I would say the time it takes for your data to travel from memory to the computation unit is insignificant when compared to the time it takes to actually perform the computation. This would explain the behavior you describe. Plus, depending on the algorithm your application implements and on the size of your cache, data you access frequently may be cached and therefore accessed very rapidly in both cases, and as such not making any difference on the final duration of your procedure.

mohammed_qaimari

Posts: 11
Re: 64-bit double math performance
Posted: Jul 22, 2007 12:00 AM   in response to: edwardx21
 
  Click to reply to this thread Reply

Hi..


The first thing came to my mind, are using a 32bit or 64bit JVM?

if you're using 32bit JVM, you won't take any advantage of your CPU.
One more thing, People usually upgrade to 64-bit JVM+CPU to take advantage of the
Huge address space the architecture offers.

regards,

loke

Posts: 7
Re: 64-bit double math performance
Posted: Jul 22, 2007 9:13 PM   in response to: edwardx21
 
  Click to reply to this thread Reply

Doubles are already 64-bit native in a 320bit environment. You should expect to see some improvement for 64-bit integers, but not necessarily for floating point.

It also depends on what architecture you are using, but both SPARC and Opteron has native 64-bit floating point even is 32-bit mode.

loke

Posts: 7
Re: 64-bit double math performance
Posted: Jul 22, 2007 9:14 PM   in response to: loke
 
  Click to reply to this thread Reply

32-bit, of course. Not 320 bits. That was typo. :-)

gustav3d

Posts: 27
Re: 64-bit double math performance
Posted: Aug 10, 2007 11:41 PM   in response to: loke
 
  Click to reply to this thread Reply

a CPU does not load more data when switching from 32 to 64 bit mode.
the mem path width is 64bit on the 'standard' PC since long.
a read is done in chunks of a cache line, 64-128 Byte is how its been on x86 for many years now.

The x86 floating points has 3 different operand sizes:
32 64 80 bit. no change from 32 to 64 bit mode there.

Its to expect that certain tasks do run slower in 64bit mode due to the pointers being bigger.
in general its estimated that roughly 30% more memory is needed when switching to 64bit mode as the cause of this.
the cpu caches will hence need to read from ram more often in 64bit mode.
likewise for the OS need of paging to disk.

thats why these memory allocation sizes differs:
String char len: 32bit: 64bit:
0 40 64
8 56 80

regards
gustav trede

sumavalluru

Posts: 1
Re: 64-bit double math performance
Posted: Sep 11, 2007 2:12 AM   in response to: edwardx21
 
  Click to reply to this thread Reply

Hi, iam very new to this forum... I would like to post my thread in this forum...

Cheers,
Suma valluru
---------------------------
https://www.esumz.com




 XML java.net RSS