[computer-go] Language War!
Peter Drake
drake at lclark.edu
Mon Jul 31 20:50:25 PDT 2006
On Jul 31, 2006, at 7:26 PM, Ross Werner wrote:
> 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.
I intend to do some rewriting, not a straight translation.
> How large is a Java class containing only public fields (no
> methods) compared to a similar C/C++ struct?
Good question -- does anyone here know the answer?
> 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.
Someone here made a comment about seeing no need to write bad Java
code. We could probably get an awful lot of speed by doing everything
inside a gigantic array of ints, but it might be even more painful
than using C++. Also, I'm hoping to shave off some time spend on
bounds checking, gratuitous function calls, pointer dereferences, etc.
Again, I don't know what I'm talking about yet, so it should be an
adventure. Perhaps we'll discover that the Lovecraftian horror of
managing one's own memory is not worth it...
Peter Drake
Assistant Professor of Computer Science
Lewis & Clark College
http://www.lclark.edu/~drake/
More information about the computer-go
mailing list