views:

487

answers:

4

I made the observation that my java application is running much faster when executed on an AMD processor in contrast to an Intel CPU.

For example my JBoss starts in about 30 seconds on a 3 GHz AMD processor and needs about 60 seconds on a 3 GHz Intel processor with identical disc, RAM and OS?

Has anyone else made this observation? Why is this so?

+3  A: 

It depends on the CPU generation as well - clock speed is not everything.

If you set up e.g. an Intel Pentium 4 and an AMD Phenom with the same clock speed, you'll see a large difference in favour of the Phenom.


Update: If you're really curious, use a profiler and post the results.

Robert Munteanu
+1 for clock speed is not everything. Even among processors from a single vendor that is true -- an Intel Core 2 processor at 2.0 GHz is faster than a an Intel Pentium 4 at 3.0 GHz a lot of the time (especially with code that's hard to branch-predict).
Daniel Pryden
+4  A: 

Other considerations:

  • Size of processor on-board cache
  • Bus speed of your motherboard
  • Cache size of your hard drive
  • Hard drive RPM and read speed

Bottom line: Unless your configurations are identical besides the chips, and you are trying to asses the performance of a particular technology, you're really comparing apples to oranges.

Paul Sasik
I became aware on this because my development cycle was faster at home (AMD 2GHz single core, slow disc, slow GPU) than at work (Intel 3GHz P4 single core, Raptor disc with 10.000 upm, fast GPU). Then I made some more measurements with a well equipped quadcore Intel, a dualcore AMD, a quadcore AMD. AMD was always faster.
tangens
A: 

I've seen 64-bit JDK work much faster than 32-bit one on the same processor. So maybe that's the case.

EDIT: http://java.sun.com/docs/hotspot/HotSpotFAQ.html#64bit%5Fperformance. Sorry, I guess I'm wrong.

tulskiy
+1  A: 

Are they both running the same architecture? Or is the AMD running a 64-bit OS?

Remember that startup time isn't everything; a 60s startup time probably isn't that bad if the application runs as fast AFTER it's started up.

MarkR