Linked by Eugenia Loli on Mon 10th Oct 2005 16:48 UTC, submitted by Shlomi Fish
Permalink for comment 42700
To read all comments associated with this story, please click here.
To read all comments associated with this story, please click here.
News
Linked by Thom Holwerda on 05/24/13 23:59 UTC
Linked by Thom Holwerda on 05/24/13 22:33 UTC
Linked by Howard Fosdick on 05/24/13 21:41 UTC
Linked by Thom Holwerda on 05/24/13 14:44 UTC
Linked by Thom Holwerda on 05/23/13 23:22 UTC
Linked by Thom Holwerda on 05/23/13 22:04 UTC
Linked by Thom Holwerda on 05/23/13 22:01 UTC
Linked by Thom Holwerda on 05/23/13 17:52 UTC
Linked by Thom Holwerda on 05/22/13 22:23 UTC
Linked by Thom Holwerda on 05/22/13 13:38 UTC
More News »
Sponsored Links



Member since:
2005-08-20
I don't doubt that if he ported his freecell solver to java, the c version would still be faster. But he doesn't seem to be very knowledgeable about java in general. He just likes to ring off things and say that they're automatically slower, just because they're java.
Functions? Must be slower! For loops? Must be slower!.. I don't think he realizes what a JIT compiler can do. A final method is easy for a compiler to inline, which would make it roughly equivalent to a macro. And if you're porting directly from c, it's obviously very easy to make many of your methods final.
You can't compile and distribute a c application as is, unless you limit yourself to one architecture and most likely one operating system. Java doesn't have that restriction. Nor is java limited entirely by sun (yes, it is to a degree). Lots of other companies have made jvms for their architectures and as the free vms get farther, it will get even better.
Imho, with regards to his sample app, the most important factor in determining which language to use is where you want to use the app. If it's extremely memory constrained, then maybe a jvm is too much. If you're trying to incorporate it into an existing java app, any performance gains are no where near worth the trouble (and security hole) of going with jni.