Hi all!
First a note - this message would be message No. 999 in this mailing list and
the afterwards would be No. 1,000. Party at eleven at my place.
Today I decided to experiment with compiling Freecell Solver with Microsoft
Visual C++ on Windows XP. I already had Developer Studio 2003 .NET installed
here, so I used it.
I generated the project files using CMake, and after realising I had to use
File -> Open Solution, I was on my way. One thing I noticed was that the
release theme generated relatively small executables. And they became smaller
after I ran cygwin's "strip" command on them. And then I tried the MinSizeRel
theme of Visual Studio. Here are the results.
MinRelSize with a comprehensive feature set and no strip:
{{{{{{{{
total 612
-rwxrwxrwx+ 1 shlomi None 73728 Jun 11 15:34 fc-solve.exe
-rwxrwxrwx+ 1 shlomi None 27648 Jun 11 15:34 fc-solve.idb
-rwxrwxrwx+ 1 shlomi None 69632 Jun 11 15:34 freecell-solver-fc-pro-range-
solve.exe
-rwxrwxrwx+ 1 shlomi None 44032 Jun 11 15:34 freecell-solver-fc-pro-range-
solve.idb
-rwxrwxrwx+ 1 shlomi None 65536 Jun 11 15:34 freecell-solver-range-parallel-
solve.exe
-rwxrwxrwx+ 1 shlomi None 27648 Jun 11 15:34 freecell-solver-range-parallel-
solve.idb
-rwxrwxrwx+ 1 shlomi None 45056 Jun 11 15:34 freecell-solver.dll
-rwxrwxrwx+ 1 shlomi None 109568 Jun 11 15:34 freecell-solver.idb
-rwxrwxrwx+ 1 shlomi None 156812 Jun 11 15:34 freecell-solver.lib
drwx------+ 2 shlomi None 0 Jun 11 15:25 stDQGDyI
}}}}}}}}
MinRelSize with a comprehensive feature strip after strip:
{{{{{{{
total 568
-rwxrwxrwx 1 shlomi None 64512 Jun 11 15:34 fc-solve.exe
-rwxrwxrwx+ 1 shlomi None 27648 Jun 11 15:34 fc-solve.idb
-rwxrwxrwx 1 shlomi None 55808 Jun 11 15:34 freecell-solver-fc-pro-range-
solve.exe
-rwxrwxrwx+ 1 shlomi None 44032 Jun 11 15:34 freecell-solver-fc-pro-range-
solve.idb
-rwxrwxrwx 1 shlomi None 53760 Jun 11 15:34 freecell-solver-range-parallel-
solve.exe
-rwxrwxrwx+ 1 shlomi None 27648 Jun 11 15:34 freecell-solver-range-parallel-
solve.idb
-rwxrwxrwx 1 shlomi None 28672 Jun 11 15:34 freecell-solver.dll
-rwxrwxrwx+ 1 shlomi None 109568 Jun 11 15:34 freecell-solver.idb
-rwxrwxrwx+ 1 shlomi None 156812 Jun 11 15:34 freecell-solver.lib
drwx------+ 2 shlomi None 0 Jun 11 15:25 stDQGDyI
drwx------+ 2 shlomi None 0 Jun 11 15:34 stK9TE8G
}}}}}}}
MinRelSize freecell-only before strip:
{{{{{{{{
total 556
-rwxrwxrwx+ 1 shlomi None 65536 Jun 11 15:40 fc-solve.exe
-rwxrwxrwx+ 1 shlomi None 27648 Jun 11 15:40 fc-solve.idb
-rwxrwxrwx+ 1 shlomi None 57344 Jun 11 15:40 freecell-solver-fc-pro-range-
solve.exe
-rwxrwxrwx+ 1 shlomi None 44032 Jun 11 15:40 freecell-solver-fc-pro-range-
solve.idb
-rwxrwxrwx+ 1 shlomi None 57344 Jun 11 15:40 freecell-solver-range-parallel-
solve.exe
-rwxrwxrwx+ 1 shlomi None 27648 Jun 11 15:40 freecell-solver-range-parallel-
solve.idb
-rwxrwxrwx+ 1 shlomi None 32768 Jun 11 15:40 freecell-solver.dll
-rwxrwxrwx+ 1 shlomi None 109568 Jun 11 15:40 freecell-solver.idb
-rwxrwxrwx+ 1 shlomi None 142012 Jun 11 15:40 freecell-solver.lib
}}}}}}}}
MinRelSize freecell-only after strip:
{{{{{{{{{
total 516
-rwxrwxrwx 1 shlomi None 54272 Jun 11 15:41 fc-solve.exe
-rwxrwxrwx+ 1 shlomi None 27648 Jun 11 15:40 fc-solve.idb
-rwxrwxrwx 1 shlomi None 45568 Jun 11 15:41 freecell-solver-fc-pro-range-
solve.exe
-rwxrwxrwx+ 1 shlomi None 44032 Jun 11 15:40 freecell-solver-fc-pro-range-
solve.idb
-rwxrwxrwx 1 shlomi None 43520 Jun 11 15:41 freecell-solver-range-parallel-
solve.exe
-rwxrwxrwx+ 1 shlomi None 27648 Jun 11 15:40 freecell-solver-range-parallel-
solve.idb
-rwxrwxrwx 1 shlomi None 18944 Jun 11 15:41 freecell-solver.dll
-rwxrwxrwx+ 1 shlomi None 109568 Jun 11 15:40 freecell-solver.idb
-rwxrwxrwx+ 1 shlomi None 142012 Jun 11 15:40 freecell-solver.lib
drwx------+ 2 shlomi None 0 Jun 11 15:41 stzpsKJS
}}}}}}}}}
So freecell-solver.dll is down to 28,672 bytes for the comprehensive version
and down to 18,944 bytes for the Freecell-only version. That's very small
considering the fact it's a 32-bit program written in C.
I wonder why the Linux binaries are so much larger than the Win32 ones. (see:
http://tech.groups.yahoo.com/group/fc-solve-discuss/message/998
).
Regards,
Shlomi Fish
--
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
Optimizing Code for Speed - http://xrl.us/begfgk
God gave us two eyes and ten fingers so we will type five times as much as we
read.
Received on Thu Jun 11 2009 - 06:19:44 IDT