[computer-go] Language War!

Ross Werner ross at indessed.com
Mon Jul 31 19:26:22 PDT 2006


On Mon, 31 Jul 2006, Peter Drake wrote:
> On Jul 31, 2006, at 12:10 PM, Mark Boon wrote:
>> I don't know what specific performance problems you're having in Java
>> that you think will be resolved in C++.There are a few areas where C++
>> obviously performs much better, but only few.
>
> One of my big bottlenecks is memory space.  I get the impression that a Java 
> object is much larger than a C/C++ struct containing the same information.

My guess is that most of the problems you're having with Java can be 
solved by using different data structures in Java that more closely mirror 
what you would do in C/C++. Moving to, say, C++ but leaving the same data 
structures as classes, etc., will probably not gain you much 
performance-wise.

How large is a Java class containing only public fields (no methods) 
compared to a similar C/C++ struct? If that difference is still too great 
for you, how about representing your structure as a Java IntBuffer? I 
understand that Java buffers are very similar in speed and size to a C/C++ 
array reference with bounds checking.

 	~ Ross


More information about the computer-go mailing list