• Post Reply Bookmark Topic Watch Topic
  • New Topic

benchmarks : execution time different intenpreters, JITs and native code compilers  RSS feed

 
Arnold Reuser
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm middle in the process of deciding :
- Do we need to use GCJ or not?
- Which interpreter (sablevm, kissme, ...)
or jitter (ikvm, kaffe, .... ) do we need when we don't use GCJ?
The current problem I have is that I need to limit the execution time of my code as much as possible.

Therefore I'm looking for benchmarks,published in 2004 or later, or people with hands on experience, that clearly state which one to use.
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Be careful not to prejudge -- you may have already made some unwarranted conclusions here. Don't assume that any of these are always or even usually faster than Sun's Hotspot JVMs (they're not.) You'd also be wise to consider stability as well as performance. I can write you a JVM that executes any program in under a second if it doesn't have to be correct!
 
Arnold Reuser
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yep Ernest, as always, you are absolutely right.
And in this situation I'm aware that my question implicit makes the assumption that the quality of the products are interchangeable, which they are obviously not.
But can you make some statement or give me a reference that gives me a clear understanding whether to use GCJ or Sun's Hotspot JVMs or maybe another stable product when performance and stability are important.
Ofcourse I don't want to move to another language just for performance reasons.
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As far as I know, gcj is the most stable and functional free Java implementation. It's functional enough, apparently, to run Eclipse (although I haven't seen this myself.) Nevertheless, that Eclipse port would have had to have been done specifically for gcj, since gcj doesn't support JNI, but it's own native method protocol. My personal experience with Kaffe is that it just can't be taken seriously. I'm sure it works fine for some people, with some programs, but it's never successfully run a single thing that I've thrown at it.

Neither of these projects have a complete class library, of course. You'd want to make sure that your code didn't use any APIs that weren't supported.

I haven't seen any recent, systematic benchmarks comparing gcj, HotSpot and/or other JVMs. Here is a thread at Javalobby I read recently where a number of folks seem to generally agree that gcj is only 30-50% the speed of HotSpot. On the other hand, here is an article about gcj from Linux Journal by the project's founder; he doesn't come right out and say it, but he doesn't argue this point. He emphasizes gcj's quick program startup time, which is true -- but unless you're writing very short little utilities, the second or three that HotSpot takes to start up doesn't really matter.

Another JVM that does outperform Hotspot, at least under some circumstances, is IBM's. See here. If you google for "IBM JVM vs HotSpot" you'll find a number of comparisons, all a few years old; I haven't seen a new one within the last year or so. Their implementation is good quality code.
 
Arnold Reuser
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for this extensive answer and references.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!