Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (482)
Games in Android Showcase (110)
games submitted by our members
Games in WIP (550)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2
  ignore  |  Print  
  Java on OS X  (Read 4233 times)
0 Members and 1 Guest are viewing this topic.
Offline Viro

Senior Newbie




Java games rock!


« Posted 2004-03-04 09:28:51 »

How fast is Java on OS X? Taking a look at the Scimark benchmarks results, I see Apple's VM consistently giving results below the 100 mark, yet other VMs like Sun and IBM give very high results.

Now I know that Scimark is a microbenchmark of sorts and the usual caveats apply, but the results are still surprising.

Is there a problem with the Apple VM, or is it something to do with the PPC architecture?
Offline princec

JGO Kernel


Medals: 362
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #1 - Posted 2004-03-04 10:06:21 »

The Apple VM is a few years behind the current Windows ones but it's not really incredibly slow... it runs my game at full speed so I'm not that fussy Smiley

PPC architecture is slightly less well suited to the stack-oriented JVM architecture, AFAIK, but it shouldn't be a killer.

Cas Smiley

Offline Viro

Senior Newbie




Java games rock!


« Reply #2 - Posted 2004-03-04 10:18:25 »

A few years behind? I'm sorry, I don't quite understand that. OS X is at 1.4.2, and Windows is at 1.4.2 (if you disregard the 1.5 beta). Its a year behind, at the most.

There are nice things about Java on OS X, but performance doesn't seem to be one of them.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline swpalmer

JGO Coder




Where's the Kaboom?


« Reply #3 - Posted 2004-03-04 10:52:41 »

From a strictly computational point of view the Mac JVM seems decent - sometimes faster than Sun's windows VM, sometimes slower, depending on what you are testing, e.g. floating point appears to be slightly faster, but some of Java Cool Dude's demos (e.g. cloth) run very very slow.  So it is hard to get a good idea in general until you actually run your app.

Where it really sucks for games is the graphics.  The graphics routines are significantly slower on the current Mac VM (1.4.2_03).  There is no hardware acceleration.  Use JOGL or LWJGL.  For now I would have to recommend JOGL (sorry Cas Smiley), because LWJGL has some significant compatibility issues on the Mac platform.  Xith3D works well.

Given that the Apple Java team has been playing catch-up for a while to get a 1.4.2 release I am hoping that now they will have a little more time to do some optimizations that they didn't have time for before... I could be dreaming though, cause they might be swamped with work on 1.5 so they aren't 'behind' again when Sun releases it.  They are working on bug fixes for their current 1.4.2 JRE as I understand it though, so maybe some performance enhancements are in the works too.

Offline princec

JGO Kernel


Medals: 362
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #4 - Posted 2004-03-04 11:45:47 »

Quote
A few years behind? I'm sorry, I don't quite understand that.

Sun's VM engineers have been working on Hotspot for several years before Apple even started on their port, is what I mean. Expect the very latest clever techniques to be missing from the Apple JVM. Mostly ones in the Sun server VM, I should think.

Cas Smiley

Offline swpalmer

JGO Coder




Where's the Kaboom?


« Reply #5 - Posted 2004-03-04 21:45:53 »

Apple doesn't have the server VM at all - so yah that is missing.  But the rest of HotSpot 1.4.2_03 optimizations I would expect are mostly implemented, since Apple has the Sun's code.  The difference is that they have to do code generation for PPC.. so that particular aspect may not be as tuned.  But in terms of inlining, and eliminate redundant checks - the Apple VM should be at the same level as the client VM on windows.... or maybe *sightly* behind if for some reason the port was complicated. (I would expect the main effort to be in the code generation for PPC though.)

Offline princec

JGO Kernel


Medals: 362
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #6 - Posted 2004-03-05 07:02:53 »

At this stage it'll all be down to the quality of the generated code, which I bet has room to improve.

Cas Smiley

Offline Jeff

JGO Coder




Got any cats?


« Reply #7 - Posted 2004-03-05 07:26:24 »

FWIW  my expereinces with the Apple VM is that it is as good as, or maybe even slightly better then, our Win32 VM in terms of performance.

As others point out its hard to do an exact comparison due to differences in hardware BUT on what I would consider a comperable level of machine Java programs seem to ru nas well or a bit better then in Win32 IME.

Ofcourse they have some OS advantages.  OSX is a heck of a lot better at threading, being a Unix, then Winblows is.   Also since they are working in a cooperative environment with their OS maker, rather then the competitive one we are, they probably have better opportunities to really tune to their platform.

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline Viro

Senior Newbie




Java games rock!


« Reply #8 - Posted 2004-03-06 12:52:04 »

Thanks for all the replies.
Offline Mark Thornton

Senior Member





« Reply #9 - Posted 2004-03-06 13:12:36 »

Quote
OSX is a heck of a lot better at threading, being a Unix, then Winblows is.
Do you have evidence for this or is it merely prejudice. Windows 9X undoubtedly isn't that good at threading, but Windox NT (2000, XP) does threading quite well. It isn't appropriate to tarnish all Windows variants with the deficiencies of one version.
Linux (is that a 'Unix') has until fairly recently been rather poor at certain aspects of threading.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline rreyelts

Junior Member




There is nothing Nu under the sun


« Reply #10 - Posted 2004-03-06 14:42:56 »

Quote
It isn't appropriate to tarnish all Windows variants with the deficiencies of one version.

Mark makes a good point here. I find that the term, "DosWindows" is a much more accurate term to use when discussing any non-NT based version of Windows.

It's kind of misleading of him, though, to compare the threading performance of Linux to anything else. Linux is still working on basic Posix performance. It's a "baby" Unix in that sense. In general, it doesn't make any sense to compare generic "Unix" performance against Windows - you can talk about the difference in APIs though. Most unices provide an implementation of pthreads, which is a sound threading API. Windows, however, has a threading API that has several flaws in it. I'm sure if you do a Google search through comp.programming.threads you'll see what I mean.

God bless,
-Toby Reyelts

About me: http://jroller.com/page/rreyelts
Jace - Easier JNI: http://jace.reyelts.com/jace
Retroweaver - Compile on JDK1.5, and deploy on 1.4: http://retroweaver.sf.net.
Offline Mark Thornton

Senior Member





« Reply #11 - Posted 2004-03-06 16:59:20 »

Quote

Most unices provide an implementation of pthreads, which is a sound threading API. Windows, however, has a threading API that has several flaws in it. I'm sure if you do a Google search through comp.programming.threads you'll see what I mean.

Most of the complaints I can find amount to Windows Threading != pthreads. While this may be unpleasant for people trying to write portable programs (and especially efforts like cygwin), it doesn't really indicate that either API is intrinsically worse than the other.

Note also that quite a few people are horrified at some of the more interesting threading behaviour that is legal for Java (even with the new memory model).
Offline rreyelts

Junior Member




There is nothing Nu under the sun


« Reply #12 - Posted 2004-03-06 18:26:12 »

Quote

Most of the complaints I can find amount to Windows Threading != pthreads.

You're not looking at the right threads then. Experts like Dave Butenhof complain that the API is just busted in certain ways. WaitForMultipleObjects comes to mind as an example.

God bless,
-Toby Reyelts

About me: http://jroller.com/page/rreyelts
Jace - Easier JNI: http://jace.reyelts.com/jace
Retroweaver - Compile on JDK1.5, and deploy on 1.4: http://retroweaver.sf.net.
Offline Mark Thornton

Senior Member





« Reply #13 - Posted 2004-03-06 19:39:22 »

WaitForMultipleObjects works fine, but there is no simple mapping between it and anything in pthreads. That group has quite a few people looking for WFMO functionality in pthreads. So Win32 doesn't work as Dave Butenhof would like it to work, and usually requires a largely separate design of the thread intensive components. Well such is life. If you want 'easy' portable multi-threading, forget C/C++ and use Java!

(Not that multi-threaded programming is ever really easy, but particularly with the new concurrent utilities in 1.5 Java is about as nice as it gets --- in my opinion).
Offline rreyelts

Junior Member




There is nothing Nu under the sun


« Reply #14 - Posted 2004-03-08 19:29:03 »

WaitForMultipleObjects works fine...

No, it doesn't.

Well such is life. If you want 'easy' portable multi-threading, forget C/C++ and use Java!

Or use an implementation of pthreads on Windows.

(Not that multi-threaded programming is ever really easy, but particularly with the new concurrent utilities in 1.5 Java is about as nice as it gets --- in my opinion).

I love Doug Lea's library and have been using it for about the last four years. You do know that its design is based entirely around pthreads, right?

God bless,
-Toby Reyelts

About me: http://jroller.com/page/rreyelts
Jace - Easier JNI: http://jace.reyelts.com/jace
Retroweaver - Compile on JDK1.5, and deploy on 1.4: http://retroweaver.sf.net.
Offline Jeff

JGO Coder




Got any cats?


« Reply #15 - Posted 2004-03-09 04:55:59 »

Quote

Do you have evidence for this or is it merely prejudice. Windows 9X undoubtedly isn't that good at threading, but Windox NT (2000, XP) does threading quite well. It isn't appropriate to tarnish all Windows variants with the deficiencies of one version.
Linux (is that a 'Unix') has until fairly recently been rather poor at certain aspects of threading.



It isnt appropriate to tarnish real *nixs with Linux.

Linus Torvalds for a long time resisted ANY threading model in Linux at all.

My experiecne is that WInNT threading compared to what I consider an appropriate commercial Unix (Solaris, AT&T,  Berkeley Unix, etc) is klunky and erratic.  Win32 has too many places where it simply locks the whole system up with competing mutexes until an operation gets done.  (Example:  I have yet to have ANY version on Win32 on my desktop that didnt lock my GUI at times during secondary storage IO.)

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #16 - Posted 2004-03-09 07:58:40 »

Quote


It isnt appropriate to tarnish real *nixs with Linux.
...
My experiecne is that WInNT threading compared to what I consider an appropriate commercial Unix (Solaris, AT&T,  Berkeley Unix, etc) is klunky and erratic.


My understanding was that Solaris was *still* in a league of it's own for threading? I have that paper lying around somewhere which describes how fine grained Solaris' locking is, the benefits to performance, and the nightmare for Sun of maintaining it.

Quote

 Win32 has too many places where it simply locks the whole system up with competing mutexes until an operation gets done.  (Example:  I have yet to have ANY version on Win32 on my desktop that didnt lock my GUI at times during secondary storage IO.)


Ah...as I understand it, that's simply total cr*p MS programmers working on the shell (Windows Explorer, and all the other MS apps that have it integrated). With recent NT's (5 and 6) I've only seen this happen with MS apps, not with anything else. Oh, except Lotus Notes, which used to do it all the time because their GUI event thread was somehow shared with the network comms thread (very, very, very stupid when your app is a replicating DB system; you could lock up for several minutes every half hour on *user's* desktop machines!).

malloc will be first against the wall when the revolution comes...
Offline Mark Thornton

Senior Member





« Reply #17 - Posted 2004-03-09 10:43:57 »

Quote

It isnt appropriate to tarnish real *nixs with Linux.

Sorry, that was just bait  Smiley

Quote
Example:  I have yet to have ANY version on Win32 on my desktop that didnt lock my GUI at times during secondary storage IO.)

I don't recall it being a problem on NT 3.51. Yes, as Blah^3 notes the current desktop/explorer stuff is deeply flawed, but it is that application rather than the threading system which is at fault.
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #18 - Posted 2004-03-09 10:58:54 »

[sidetrack]...Usually a scratched CD, or an RW in a drive that doesn't support them, or a DVD in a CD-RW drive, is enough to knock out everything from your start menu to MSIE (which will even stop repainting!) for a minute or two. I've seen this on everything up to XP - and it only happens with MS apps.

It makes you feel really good that your web-browser, your shell, your desktop, your start menu, and the dialog boxes for many MS apps are all single-tasking dependent on your CD drive. MS has kindly ensured that we *never* forget what Windows 3.x was like (before pre-emption). Grin. Who needs nostalgia when you can repdroduce the good ole days whenever you want? Smiley
[/sidetrack]

malloc will be first against the wall when the revolution comes...
Offline Bombadil

Senior Member





« Reply #19 - Posted 2004-03-09 11:09:59 »

Quote
[sidetrack]...Usually a scratched CD, or an RW in a drive that doesn't support them, or a DVD in a CD-RW drive, is enough to knock out everything from your start menu to MSIE (which will even stop repainting!) for a minute or two. I've seen this on everything up to XP - and it only happens with MS apps.

It's for many apps actually... whenever under Win2000 I convert an CD image to another format or do similar filesystem heavy tasks, the Windows PC virtually renders unusable for that time... I see this regularly on different hardware with IDE drives.
Offline cfmdobbie

Senior Member


Medals: 1


Who, me?


« Reply #20 - Posted 2004-03-10 15:26:21 »

Heh - the thing that's currently annoying me is how both Mozilla and FireBird/Fox will lock completely when you visit a page with a Java applet on it.  The browser freezes while the JVM starts, so several times a day I think "It's crashed!" followed five seconds later by "Oh, no, it's just Java starting."  It's not giving me a very good impression of Java, so god only knows what most users think.

My FireBird runs with the Click-to-play Flash movie extension, which is a godsend.  Now I want Click-to-play applet support!

Hellomynameis Charlie Dobbie.
Offline swpalmer

JGO Coder




Where's the Kaboom?


« Reply #21 - Posted 2004-03-10 21:01:12 »

FYI:  Java 1.4.2 Update 1 Developer Preview is available for OS X 10.3.1 and above from the Apple Developer Connection.
Apple looks to be doing a much better job of keeping up with Sun since they did the initial 1.4 port.  Cool.

Offline andyl

Senior Newbie




Java games rock!


« Reply #22 - Posted 2004-04-29 13:00:21 »

Quote
How fast is Java on OS X? Taking a look at the Scimark benchmarks results, I see Apple's VM consistently giving results below the 100 mark, yet other VMs like Sun and IBM give very high results.

Now I know that Scimark is a microbenchmark of sorts and the usual caveats apply, but the results are still surprising.

Is there a problem with the Apple VM, or is it something to do with the PPC architecture?


A bit late now to reply (maybe) but I think you will find the PPC architecture is better suited (more registers for example).

The problem you are seeing is probably the lack of a server VM for MacOSX. That puts it about 3x slower than it could have been. It annoys the hell out of me, all I can suggest is you lobby Apple about it (the guys at Sun/Java gaming group don't seem overly bothered, but then it's not their platform underneath). It's a crying shame, as I suspect (with proper instruction scheduling) a G5 based server VM might be one of the fastest Java based number crunching platforms out there!

Andy.

EDIT : When I get my own G5 (soon) instead of borrowing one, I will have to try some C# or J# using mono to see what the Mac platform can really do. That'll put the cat amoung the pigeons around these parts  (yes I'm trolling) Wink
Offline vredungmand

Senior Newbie




Java games rock!


« Reply #23 - Posted 2004-04-29 13:28:20 »

I tried dotGnu on my macosx machine and it was a great deal slower than the Java VM.

Offline andyl

Senior Newbie




Java games rock!


« Reply #24 - Posted 2004-04-29 13:34:40 »

Quote
I tried dotGnu on my macosx machine and it was a great deal slower than the Java VM.


That would be because dotGNU is interpreted (eventually), whereas Java eventually compiles to native code, as does mono.
Offline Viro

Senior Newbie




Java games rock!


« Reply #25 - Posted 2004-05-30 10:36:07 »

Quote
Heh - the thing that's currently annoying me is how both Mozilla and FireBird/Fox will lock completely when you visit a page with a Java applet on it.  The browser freezes while the JVM starts, so several times a day I think "It's crashed!" followed five seconds later by "Oh, no, it's just Java starting."  It's not giving me a very good impression of Java, so god only knows what most users think.

My FireBird runs with the Click-to-play Flash movie extension, which is a godsend.  Now I want Click-to-play applet support!


That seems to be an inherent problem with Mozilla/Firebird's plug-ins. I get the same problem with Adobe Acrobat files, MS Word files, etc. And this is on an Athlon 64 with gigs of RAM so the machine ain't the issue.
Offline Viro

Senior Newbie




Java games rock!


« Reply #26 - Posted 2004-05-30 10:38:31 »

Quote


That would be because dotGNU is interpreted (eventually), whereas Java eventually compiles to native code, as does mono.


I've tried mono on Linux a few weeks back. Running Scimark on Mono is a joke. It provides performance about equal to the client VM(1.4.2_04) on my machine. Needless to say, the server VM mopped the floor with it.

And yes, I did enable the JIT, and passed all sorts of other optimization parameters. Not much diff.
Offline swpalmer

JGO Coder




Where's the Kaboom?


« Reply #27 - Posted 2004-05-30 12:47:08 »

In case anyone didn't notice Java 1.4.2 Update 1 Developer Preview 2 is now available for Mac OS X  10.3.3 and above.  

Offline ribot

Junior Member




Ribot - mobile UI specialist


« Reply #28 - Posted 2004-06-01 19:25:28 »

and just as an additional note: when downloading the OS X Developer Java Updates - select to download from the US based servers rather than the European as they are ten times as fast.

http://ribot.co.uk - design agency focused on mobile
http://www.retrospecs.co.uk - online vintage eyewear store
Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #29 - Posted 2004-07-20 06:41:59 »

Quote


I've tried mono on Linux a few weeks back. Running Scimark on Mono is a joke. It provides performance about equal to the client VM(1.4.2_04) on my machine. Needless to say, the server VM mopped the floor with it.

And yes, I did enable the JIT, and passed all sorts of other optimization parameters. Not much diff.


That's actually quite impressive. So on the Mac, mono is as fast as java. This illustrates the need of a server VM on the Mac. Or better yet, a merged VM everywhere.

Pages: [1] 2
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

CopyableCougar4 (14 views)
2014-08-22 19:31:30

atombrot (28 views)
2014-08-19 09:29:53

Tekkerue (25 views)
2014-08-16 06:45:27

Tekkerue (23 views)
2014-08-16 06:22:17

Tekkerue (15 views)
2014-08-16 06:20:21

Tekkerue (22 views)
2014-08-16 06:12:11

Rayexar (61 views)
2014-08-11 02:49:23

BurntPizza (39 views)
2014-08-09 21:09:32

BurntPizza (31 views)
2014-08-08 02:01:56

Norakomi (37 views)
2014-08-06 19:49:38
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!