Hi all,
today I benchmarked Freecell Solver 2.16.0 (latest release) against the then
latest trunk on the MS-32,000. The speeds were comparable with the trunk being
faster in slightly more than a second (for over 200 seconds of total run-
time).
Then I've done an experiment that I intended to do for quite some time now.
Freecell Solver accepts some parameters that determine the exact rules and
configuration of the Solitaire game. During run-time it consults these
parameters again and again to see how it can solve the board.
What I did was create an optional C-preprocessor macro called
FCS_FREECELL_ONLY that hard-coded the --sequences-are-built-by ,
--sequence-move and --empty-stacks-filled-by parameters to their Freecell
ones. Then I compiled a generic version of FCS without the macro and one with
it defined. Then I benchmarked them both against the MS 32,000.
Here are the results:
{{{{{{{{{{{{{
shlomi:$trunk/fc-solve/source$ perl scripts/time-fcs.pl ./dump-gener.txt
212.360308885574
shlomi:$trunk/fc-solve/source$ perl scripts/time-fcs.pl ./dump-fcell.txt
209.265234947205
shlomi:$trunk/fc-solve/source$
}}}}}}}}}}}}}
So the Freecell-only version was faster by slightly over 3 seconds, or 1.46%
of the total. That's not significant enough to remove such important features,
and turn Freecell Solver into Freecell-Only Solver, but still may be
indicative of how much time is spent on such genericness.
Next I'd like to try to hard-code num_freecells / num_stacks / num_decks as
part of the FCS_FREECELL_ONLY too and see if it gives any further savings.
Regards,
Shlomi Fish
--
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
Interview with Ben Collins-Sussman - http://xrl.us/bjn8s
God gave us two eyes and ten fingers so we will type five times as much as we
read.
Received on Tue Mar 17 2009 - 10:51:20 IST