On Monday 18 May 2009 19:24:00 Shlomi Fish wrote:
> In the trunk, I eliminated the linking of the functions inside simpsim.c to
> the .so file when FCS_FREECELL_ONLY is specified. It can be made more
> configurable, but it is still pretty good and seems to work. Strangely
> enough, benchmarking it now yielded a somewhat smaller speed than the
> latest benchmark.
>
> In any case, I wanted to measure the Freecell Solver shared library
> ("libfreecell-solver.so*") in the different configurations to see how big
> it is. So I wrote a Ruby script to measure it in the different
> configurations and prepare a report. Here is the report:
>
And here is the report with gcc-4.4.0:
{{{{{{{{{{{{{{{{{
default - before strip - 252886
default - after strip - 121520
release - before strip - 122772
release - after strip - 109180
r-fc-only - before strip - 109828
r-fc-only - after strip - 96968
r-no-simple-simon - before strip - 101540
r-no-simple-simon - after strip - 88680
r-fc-only-arch-omit-frame - before strip - 112142
r-fc-only-arch-omit-frame - after strip - 99272
r-fc-only-omit-frame - before strip - 113828
r-fc-only-omit-frame - after strip - 100968
r-no-simple-simon-omit-frame - before strip - 105636
r-no-simple-simon-omit-frame - after strip - 92776
gcc-Os - before strip - 89586
gcc-Os - after strip - 76700
gcc-Os-fc-only - before strip - 75578
gcc-Os-fc-only - after strip - 63448
gcc-Os-no-simple-simon - before strip - 77442
gcc-Os-no-simple-simon - after strip - 65308
}}}}}}}}}}}}}}}}
-no-simple-simon excludes the simple simon routines but otherwise isn't
Freecell-only. -fc-only implies -no-simple-simon. One can see that fc-only is
bigger than no-simple-simon sometimes and sometimes it's smaller. Maybe I'm
doing something wrong.
But we're down to 63,448 for the Freecell-only configuration and that's nice.
Regards,
Shlomi Fish
> {{{{{{{{{
> default - before strip - 261266
> default - after strip - 118172
> release - before strip - 120755
> release - after strip - 107420
> r-fc-only - before strip - 101283
> r-fc-only - after strip - 88680
>
> [ That's report - freecell only. ]
>
> r-fc-only-arch-omit-frame - before strip - 102349
> r-fc-only-arch-omit-frame - after strip - 89736
>
> [ Release, Freecell Only, with -march=pentium4 and -fomit-frame-pointer ]
>
> r-fc-only-omit-frame - before strip - 105379
> r-fc-only-omit-frame - after strip - 92776
>
> [ Release, FC Only, with -fomit-frame--pointer (and no -march) ]
>
> gcc-Os - before strip - 89711
> gcc-Os - after strip - 76680
>
> [ Release, with -Os (optimise for size), and generic (no FC Only) ]
>
> gcc-Os-fc-only - before strip - 78303
> gcc-Os-fc-only - after strip - 66020
>
> [ Release, with -Os and Freecell Only ]
> }}}}}}}}}}}}
>
> So we're down to 66,020 bytes for the fc-only and 76,680 for the generic
> version. Although the other results are not bad either. For comparison,
> Gary Campbell's FCELL.COM which is written in 8088 Assembly for DOS is
> 13,641 bytes. So this makes Freecell Solver about 4.8 to 5.6 bigger than
> it, which is acceptable for a 32-bit program written in C.
>
> The code and binary size may still be reduced further by using refactoring
> and other cleanups, but I don't think they are too big.
>
> Regards,
>
> Shlomi Fish
>
> P.S: now after I moved lookup2.{c,h} to the rejects and am no longer
> compiling it, the gcc-Os-Fc-only after strip is only 65,908 bytes long.
> That's even (slightly) better.
--
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
Why I Love Perl - http://xrl.us/bjn88
God gave us two eyes and ten fingers so we will type five times as much as we
read.
Received on Fri May 22 2009 - 08:37:33 IDT