Posted Sat, 07 Feb 2004
I recently had a request for my opinion about Java's performance under OS X. Unfortunately I don't have any valid method of comparison other than my own personal experience, and even that doesn't provide too much.
Some background first: I've been using Macs for about 2 years now, and I must say they are the best systems I've ever used. From an aesthetic point of view, the hardware is just plain sexy; from a practical standpoint, it's fast and reliable. (I also have many fast reliable x86 boxes... the point of this is not to start a flame war!). The operating system was the main selling point for me; in the x86 world I am a *NIX user (linux on some, darwin on others, and i'm thinking about getting my hands dirty with Hurd) -- but I keep my x86 world to server functions rather than using them as desktops now. This is because after discovering Apple's Aqua interface on OS X, and knowing that BSD and all my favorite and familiar tools are just under the covers, I could never go back.
So as an Enterprise Java developer -- this left me with the question: sure it looks great, is easy to use, and is a BSD, but what about Java?
"What about Java?" is a loaded question. There's many aspects to Java... most end users would particularly be interested in GUI performance, as Java has the notorious reputation for having bad interface performance. As developers, GUI performance is also important, not only in our development, but also in the tools we use... most Java IDE's are themselves written in Java, and if they don't work well, we don't work well. We also need to be concerned with the performance of our tools, such as the java compiler, the Ant build system, and anything else you happen to use. As Enterprise Developers we further have the headache of needing to run application servers, I myself use JBoss, many others perhaps use Apple's WebObjects, or maybe even just the Sun Reference Implementation.
Like I said above, I don't have any formal measurement for performance, just my own experience... but on all of the above noted points, I am thrilled with Java's performance on OS X.
Apple's has done an enormous amount of performance tuning in the Swing and JFC libararies in their JRE implementation; so much so, in fact, that I can rarely notice a difference between running Swing applications and Cocoa (apple's native UI) applications.
The only real "tool" I use regularaly is Ant. For the sake of this article, I took my current project tree and compiled it on my Mac, and also on my IBM workstation (specs at the bottom of this post...). A clean build of my project tree on the Mac took a solid 1.2 seconds longer than on my IBM (and when you look at the specs, you'll see why); and with an average build time of 27 seconds, a 1.2 second discrepancy is perfectly acceptable.
How about my application server... I mentioned that I use JBoss. For those of you who have never started JBoss, it has the nice little feature of telling you how long it took to start the JBoss Microkernel after the server initialization is complete. Now here, I definitely have no valid comparison to my x86 server (again, specs below...). I can start JBoss on my Mac in just under 20 seconds. My colleagues at IBM who are helping to test my system tell me they're server starts JBoss in about 25, unfortunately the only specs I have on their system is that it's a mid-range P4 desktop running Windows XP. I don't know what they have to memory, processor speed, bus speed, or if they have a hyperthreading processor.
So -- what's all this tell you about performance of Java on OS X? -- unfortunately not much. Just my personal experience with it, and I'm thrilled. I've had no issues with it whatsoever, performance or functional.
A couple points worth mentioning:
- XCode, Apple's development suite, has fantastic support for developing Java projects, and it's entirely free... it comes with OS X infact. I use it frequently. (My primary IDE is IntelliJ's IDEA).
- The JRE on OS X is put out by Apple, not Sun. From what I understand the Sun people work very closely with Apple to ensure the JRE is 100% compatible with the actual Sun implementation; Apple prefers to put out their own JRE so that they can provide performance tuning specifically for their hardware and operating system.
System specs:
- My mac: A PowerBook G4 17" 1.0 Ghz w/ 768 Meg RAM
- IBM Desktop: Intellistation X Pro Pentium 4 2.8 Ghz w/ 2G RAM and Hyperthreading enabled
- IBM Server: Intellistation Z Pro: Dual Xeon 2.8 Ghz w/ 2.5G RAM and Hyperthreading enabled
As you can see, my x86 equipment far surpasses my laptop as far as performance goes... so my psuedo-runtime numbers on each platform should be compared with a grain of salt.
add to del.icio.us



