Author: Dann Corbit
Date: 18:46:35 05/10/02
Go up one level in this thread
On May 10, 2002 at 20:59:18, Oliver Roese wrote: >On May 09, 2002 at 10:33:52, Russell Reagan wrote: > >>I've recently started learning Java, and I am curious how suitable it is for >>writing a chess program in comparison with C or C++. The main issue would seem >>to be that Java has generally been seen as having a significant performance hit >>when compared with compiled C or even compiled C++. I think a lot of things in >>the computer world get a bad reputation if they have some drawback when they are >>initially released. So is this still a major issue today? I like a lot of things >>Java has to offer, and it seems like I could develop a program quicker in Java, >>and at the same time write a portable GUI for it, make it playable from a web >>browser, and so on. >> >>Having said all of that, I'd still like to have a good chess program and >>eventually enter it into some of the amateur tournaments like maybe CCT5 (if and >>when that occurs). So would I be making a mistake by choosing Java due to it's >>lack of raw speed in comparison to C or C++, or is this not that big of a deal >>unless I'm going to be overly concerned with super-optimization way down the >>line? >> >>In the book, "Java in a Nutshell", the author writes: "Although early releases >>of Java suffered from performance problems, the speed of the Java VM has >>improved dramatically with each new release...Java programs can execute at >>speeds comparable to the speeds of native C and C++ applications." So while this >>is true for some applications where performance isn't even an issue, like maybe >>a word processor, is this true for a chess program or other game playing >>programs? >> >>Thanks, >>Russell > >I think this comparison thourough and informative: >http://www.rolemaker.dk/articles/evaljava/ >(Though the design of the frontpage is akward...) "6.11 Conclusion Today tweaked Java code is a little slower than tweaked C++ code on the average, typically around 20-50% slower, but this may vary a lot. In some cases Java is up to twice as fast as C++ and in some cases it up to three times slower. Untweaked Java code is usually 2.5 – 4 times slower than untweaked C++ code but this varies much. Tweaking the code causes the readability of the code to be significantly reduced and hence also the productivity of the programmer. Fortunately it is very often only necessary to tweak very little parts of the code, since very little of the code usually is run most of the time." My suspicion is that tweaking the C++ code will return the 2.5 to 4 x factor.
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.