Page 1 of 1

performance trick

PostPosted: Sun Jun 12, 2005 7:37 pm
by stan
there's an easy way to increase expert lotto's performance. edit file expertlotto.cmd in folder bin in expert lotto's install dir
and change line
[m]java -cp .;lib/jh.jar;lib/expertlotto.jar;lib com.expertlotto.Lotto[/m]
to this
[m]java -cp .;lib/jh.jar;lib/expertlotto.jar;lib -server com.expertlotto.Lotto[/m]

this forces the java runtime to run in server mode which makes the code to be optimized for repeated executions of the same pieces of code. that fits the profile of expert lotto very well.

on my machine generating all combinations for a 6/49 lottery takes about 10 seconds without the -server option.
using the -server option it takes only 7 seconds.

i'll fix the next release to use this option by default. until then you can try running expert lotto by double clicking the modified .cmd file instead of start menu shortcut.