On Dec 19, 2007 1:00 PM, Jeff Nowakowski <[EMAIL PROTECTED]> wrote: > On Tue, 2007-12-18 at 15:04 -0500, John Tromp wrote: > > > > See the Haskell implementation of my connect-4 solver, Fhourstones, at > > http://www.cwi.nl/~tromp/c4/fhour.html > > You say on that page: "On my machine, the Java version is 75% slower > than the C one, which I find hard to explain." > > Try running with -server, which enables aggressive JIT. On my machine > that made it nearly the same speed as the C version. It needs more > memory, though, and the first test case will be slow.
tromp> java -version java version "1.4.2_15" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_15-b02) Java HotSpot(TM) Client VM (build 1.4.2_15-b02, mixed mode) tromp> javac -O SearchGame.java tromp> java -server -Xmx100m SearchGame < inputs Fhourstones 3.1 (Java) Boardsize = 7x6 Using 8306069 transposition table entries. Solving 8-ply position after 45461667 . . . score = 5 (+) work = 14 51596 pos / 172 msec = 299.977 Kpos/sec - 0.281 < 0 = 0.001 > 0.001 + 0.716 Solving 8-ply position after 35333571 . . . score = 1 (-) work = 21 8716732 pos / 4696 msec = 1856.204 Kpos/sec - 0.271 < 0.036 = 0.02 > 0.089 + 0.584 Solving 8-ply position after 13333111 . . . score = 3 (=) work = 26 169704432 pos / 89157 msec = 1903.434 Kpos/sec - 0.216 < 0.144 = 0.021 > 0.242 + 0.377 tromp> gcc -O3 -m64 -o SearchGame SearchGame.c tromp> ./SearchGame < inputs Fhourstones 3.1 (C) Boardsize = 7x6 Using 8306069 transposition table entries. Solving 8-ply position after 45461667 . . . score = 5 (+) work = 15 105896 pos / 29 msec = 3651.6 Kpos/sec - 0.285 < 0.000 = 0.000 > 0.000 + 0.714 Solving 8-ply position after 35333571 . . . score = 1 (-) work = 23 26134620 pos / 4777 msec = 5470.9 Kpos/sec - 0.280 < 0.047 = 0.022 > 0.105 + 0.546 Solving 8-ply position after 13333111 . . . score = 5 (+) work = 23 37058374 pos / 6561 msec = 5648.3 Kpos/sec - 0.263 < 0.065 = 0.026 > 0.133 + 0.513 Huge difference (almost 3x faster).... Can someone try with a more up-to-date JVM, like the latest from Sun and IBM, and with 64-bit opteron support? regards, -John _______________________________________________ computer-go mailing list computer-go@computer-go.org http://www.computer-go.org/mailman/listinfo/computer-go/