Author: Bob Green
Date: 07:47:55 09/16/01
Go up one level in this thread
On September 15, 2001 at 22:22:18, Vincent Diepeveen wrote: <bigSnip/> >>>>On September 15, 2001 at 14:30:40, Vincent Diepeveen wrote: >>>If compilers optimized very well, then our problems would be solved Bruce, >>>we could go write our programs in JAVA or C++ and let the compiler handle >>>the problems of not allocating and removing objects. >> <snip/> >Oh sorry, didn't realize JAVA was that a horrible language, thanks >for the explanation! > I know Java a whole lot better than C, and C a little better than assembler. I first wrote a board game in Java and it played, but played horribly slow. My "problem" was that I was designing and implementing in an OO fashion...and game playing speed (==strength in this case) not from good, reusable OO architecture. At the suggestion of Dr. Hyatt, Bruce Moreland and others I switched to C, completely re-wrote the move and board representations to be bitmapped oriented, changed the negaScout routine from Java to C and adjusted only slightly to the new move representation and converted the evaluation function _without change in what it does_ (again, minor enhancement/conversion due to bit maps.) While I know many will point out that this is apples and oranges comparison, my point here is to the comment relative to "Java as a horrible language" -- I now think for these types of game programs it _is_ a horrible language. However, I also think C is a horrible language for constructing reusable web objects (I'm Java all the way there.) I know I could eek out some more speed if I re-wrote this program from C to assembler. However, C wins out here as well since 1) this is a hobby for me and C is as low a level language as I care to program in, and 2) there is no outside this domain reason to learn the assembler proficiency necessary to get these gains. Assembler is undoubtedly "better" for some, but for me C is "better". Each language has strengths in various domains... Bob Green
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.