Java on Intel Macs

Discussion in 'Mac Programming' started by adrianm, Feb 21, 2006.

  1. macrumors member

    Joined:
    Oct 31, 2005
    #1
    I've heard very little on the subject of Java performance on the new Intel-based Macs.

    Sounds suspicious to me. If it was good, then I'd have thought Apple would be shouting it loud and clear, especially since it's easy to compare VM performance between identical (ish) hardware but running different OS/VM combos (xp/linux with ibm/sun, osx with apple).

    Anyone shed any light on this?
     
  2. Guest

    caveman_uk

    Joined:
    Feb 17, 2003
    Location:
    Hitchin, Herts, UK
    #2
    Well it's crap on the PPC macs so I wouldn't expect much if I were you.
     
  3. Cue
    macrumors regular

    Joined:
    Mar 10, 2005
    Location:
    Edinburgh, UK
    #3
    Any evidence to back this up? :/
     
  4. macrumors 6502

    Joined:
    Apr 16, 2003
    Location:
    Boston, MA
    #4
    Java is much, much slower on the Mac than Windows. I have a hard time believing you've never noticed.

    http://www.jole.fi/JavaPerformanceTest/

    Edit: The G5 seems to be much better at Java than the G4. Damn, I wish I had one. Java's terrible on my PB.
     
  5. macrumors 6502

    Joined:
    Nov 23, 2005
    #5
    Nope, I have noticed that my Dual G5 handles java much better
     
  6. macrumors regular

    Joined:
    Feb 21, 2006
    Location:
    United Kingdom
    #6
    How can this test be run on a windows machine? Just curious.
     
  7. macrumors 6502

    Joined:
    Apr 16, 2003
    Location:
    Boston, MA
    #7
    I'm not sure it can, I think that was run on linux - I threw it up there for a comparison between hardware, but forgot to mention. I'm trying to find a better benchmark now.
     
  8. macrumors 6502

    Joined:
    Apr 16, 2003
    Location:
    Boston, MA
  9. thread starter macrumors member

    Joined:
    Oct 31, 2005
    #9
    Thx

    Not quiet :) but thanks anyway. This just looks like a number crunching benchmark; I'm more interested in GC efficiency, lock contention performance, heavy thread scheduling performance, etc.

    I've found that my dual G5 2.5ghz consistently out-perform the Intel blades we use at work (Linux or XP) and under very heavy load conditions.

    Running this particular test on my Mac: 251.7.

    The Core Duo gets 228.4, so I suppose they're pretty even per core, with the 1.5 year old G5 just a bit quicker.

    I'd expect this to improve over time.
     
  10. Cue
    macrumors regular

    Joined:
    Mar 10, 2005
    Location:
    Edinburgh, UK
    #10
    I don't have a Mac, thats why Im asking! :)
     
  11. macrumors 6502

    Joined:
    Apr 16, 2003
    Location:
    Boston, MA
    #11
    Oh, I thought you had one and didn't notice :). I've had people argue the opposite, even having both.

    At least with the G4s, Java can be awful to use on occasion.
     
  12. macrumors 68040

    plinden

    Joined:
    Apr 8, 2004
    #12
    I'm a Java developer and I'm extremely pleased with Java performance on my Intel iMac ... compilation anyway. I haven't properly tested runtime performance. I'm only really concerned with compilation since my apps will be installed on Linux servers anyway.

    For compiling the same project:
    Dell Latitude 2.26GHz D810, 2GB RAM
    60 seconds using Windows XP
    39 seconds using Fedora Core 3

    Intel iMac 17" 1.83GHz, 2GB RAM:
    40 seconds

    Although this may seem disappointing for a dual core at first glance, javac only uses one core, so this is comparing a single 1.83GHz CPU to a single 2.26GHz CPU.

    While importing CD into iTunes:
    8 minutes on Dell using Windows XP
    42 seconds on iMac

    For comparison, my Dell compiles the same project almost twice as fast as my colleagues 1.5GHz G4 PowerBook so there should be a 3-4x speed up with the Intels.

    Edit: and yes, I need to do some serious runtime testing, but haven't got around to it yet.
     
  13. macrumors 68040

    plinden

    Joined:
    Apr 8, 2004
    #13
    I ran that test on my Windows machine no problem - it's just using ant to compile. I got results roughly in line with that on my PC laptop (taking into account the difference in CPU) and with the same ratios as the tests I mentioned in my other post.
     
  14. thread starter macrumors member

    Joined:
    Oct 31, 2005
    #14
    ant test on g5

    I ran the ant test on my 2.5ghz x2 G5.

    Took 15 seconds.

    Not great really.

    But then, on my G5, I'd do parallel builds with ant (using parallel task) so that would speed things up over 2 cores.

    As an aside, I often do Xcode Obj-c work at home and do that on my 12" iBook in front of the TV watching football, and using the xcode distributed build system to let my G5 do the donkey work.

    That's cool :)

    As a laugh, I ran the ant test twice in parallel. Combined took 19 seconds.

    Generally this proves that small builds take little time regardless of platform. Big builds, in parallel, are more demanding of bus/disk io/number of cores, etc. At work, a full build of our system on my single core xp 3.2ghz P4 takes 24 mins from local disk. My G5 Mac does it in 16.

    So to people who say that Java on the Mac is slow - I disagree in (my) real world. But I'm still keen to know if a lowly dual core Intel Mac will better my PM. Looks like it won't, but gets close.

    Dual core macs look like good value, then.
     
  15. macrumors 68040

    plinden

    Joined:
    Apr 8, 2004
    #15
    My 2.26GHz laptop running Linux and dual core 1.83GHz iMac both take 13 seconds. I can't be bothered to boot into Windows to test it but it was about 20 seconds when I did it. I should try with a larger project but I'm just starting a new one now so don't have a lot to compile.
     
  16. macrumors 603

    Stella

    Joined:
    Apr 21, 2003
    Location:
    Canada
    #16

    Apple implementation of Java is horrid. Its super slow... very disappointing. I, too, hope that the Intel Macs have improved Java performance ( just because they are much faster processors).

    Eclipse on my G4 1.67 is just about usable. No problems under Windows, it flies. It doesn't help that SWT doesn't work with AWT.. thus a lot of Eclipse plugins won't work under OSX. Eclipse may be large, but its not slow ( on windows or Linux ).

    Apple want the Mac to be a good Java platform... they have a long way to go.

    Generally, its well known that Apple's Java isn't that good ( performance wise ). Sun won't support Macs, Apple have to do it themselves. Saying that, Apple have optimised Java for Macs in various ways.. but doesn't help the general performance.
     
  17. macrumors newbie

    Joined:
    Feb 23, 2006
    Location:
    Berkeley, Ca
    #17
    Eclipse 3.2.0 M5

    I just got my intel Mac yesterday and tried Eclipse 3.1.2 and wasn't too pleased with the speed. I found that the newer development release 3.2.0 M5 is *much* faster. It's a universal binary and runs much faster than the older PowerPC version 3.1.2 which (presumably) runs in Rosetta emulation. I should mention that it's a very vanilla intall, many plug-ins won't work until (or nearly until) the final release of 3.2. I was able to use the SVN subclipse plug-in which has been helpful. Anyone else tried this version?
     
  18. Cue
    macrumors regular

    Joined:
    Mar 10, 2005
    Location:
    Edinburgh, UK
    #18
    Where were you guys when I made this post? :)
     
  19. macrumors regular

    Joined:
    Feb 14, 2006
    #19
    Java, for what its worth, is an "interpreted" language. They don't like to say that, as the word interpreted has connotations, like its totally text, which its not.

    Java files are compiled into something refered to as "byte code", which is a binary file that comprises your code. Basically, the big promise with Java is "write once, run anywhere".

    So, code that is written on an Os X machine "should" be able to run on ANY Java Virtual Machine (jvm) on ANY platform (windows, os/2, os/390, mac, linux, etc). This in theory is correct, but not always true in practice, but I would say it works 97% of the time.

    EDIT: BTW, for what its worth, I would think the JVM would get better now the Macs are intel-based. Not that the G4/G5 are bad, but there are a lot of JVMs out there, including the ones for sun, already compiled and ready for Intel platforms. As Sun themselves have a Linux x86 JVM thats pretty darn good, and Linux and OsX share a similar *nix ancestry, I would think porting that one over would not be that bad. Question is, would Apple do it, seeings there is probably a small handful of true Java developers on Mac...just my $0.02 worth.
     
  20. macrumors 68040

    plinden

    Joined:
    Apr 8, 2004
    #20
    None of us had Intel Macs back than. I've come across several throw-away comments in forums and blogs that said that Intel Mac java performance was 2x-3x better - compared to what CPU, I don't know. All I know is that in my experience compilation is much faster, even than on my Windows machine, and is comparable to Linux on a 25% faster CPU.

    Ok, I don't use Eclipse for development, but I'm willing to download and try it out and see if it's usable.

    Edit: Of course, as bnash said, eclipse 3.1.2 is a PPC, so perhaps I'll not bother downloading that 98MB file. I'll stick to the command line.
     
  21. Cue
    macrumors regular

    Joined:
    Mar 10, 2005
    Location:
    Edinburgh, UK
    #21
    The post is actually referring to an iBook :)
     
  22. macrumors 6502a

    Converted2Truth

    Joined:
    Feb 6, 2004
    Location:
    Hell@HighAltitude
    #22
    netBeans on intel macbook

    I bought a 1.67ghz G4 powerbook because i thought java performance would be twice that as it was on my Ti800mhz. When i got it, java performance was almost identical. I was pissed. So i ebay'd that one too. Now i have no powerbook/macbook, and am waiting for an apple laptop that can run netbeans with the following conditions...

    -can display methods that i'm typing before i finish typing them.
    -can compile trivial (<100k of .java) in about a second.

    all i want is a SNAPPY java IDE. So far, i've only been able to experience this on my PentiumD 3.2ghz and DP1.8ghz G5 (although the Pentium spanks it).

    Can anyone testify to the SNAPPINESS of netbeans on a macbook pro (2ghz)?

    PLEASE O PLEASE, someone tell me if this mac delivers...
     
  23. macrumors 68000

    Soulstorm

    Joined:
    Feb 1, 2005
    #23
    I had heard that from now on, java framework will not be developed as other frameworks do, such as Carbon and Cocoa.

    Is that true?
     
  24. Guest

    caveman_uk

    Joined:
    Feb 17, 2003
    Location:
    Hitchin, Herts, UK
    #24
    The java bridge to the cocoa frameworks isn't been updated any more and no new features are being added.
     
  25. macrumors member

    rehlers

    Joined:
    Feb 13, 2006
    Location:
    Phoenix, AZ - USA
    #25
    While I've never done a head-to-head comparison of Java applications between Mac and Windows, I do run quite a few large java applications on a frequent basis. I had been using a Mac Mini G4 1.5Ghz w/1GB ram. I use moneydance (java quicken-like application) and triplea (java axis and allies game) quite a bit. I never really had a problem with the performance of them on the Mac Mini. I guess they were a little sluggish feeling, but more Java applications on any platform are. I now have a MacBook Pro and playing around in TripleA, it feels much more responsive, I'd say its at least 2-3x better. Of course that could be due to the faster CPU more than better Java. I'm quite happy with it.
     

Share This Page