Page 1 of 1

egtb.cpp and size of executable

PostPosted: 06 Feb 2010, 13:17
by vergie
Hello,

for testing I implemented nalimov endgame TB access. I used the egtb.cpp file from crafty.
First thing i recognized was the increase of the executable size of my engine from about 200 KB to more than 1000 KB.
I used the MS C++ Compiler on windows and icc on linux. I could not find compiler settings to reduce the size.

On Jim Ablett's side I found a windows x64 crafty version with only 246 KB.

How is it possible to create such small executables ?


Ralf

Re: egtb.cpp and size of executable

PostPosted: 06 Feb 2010, 20:20
by Jim Ablett
vergie wrote:Hello,

for testing I implemented nalimov endgame TB access. I used the egtb.cpp file from crafty.
First thing i recognized was the increase of the executable size of my engine from about 200 KB to more than 1000 KB.
I used the MS C++ Compiler on windows and icc on linux. I could not find compiler settings to reduce the size.

On Jim Ablett's side I found a windows x64 crafty version with only 246 KB.

How is it possible to create such small executables ?


Ralf



Hi Ralf,

Make sure exe is stripped > strip crafty.exe
then compress it. (these usually strip it as well)

Windows x64:
Mpress (http://www.softpedia.com/get/Programmin ... RESS.shtml)
or
Pespin (http://pespin.w.interia.pl/)

Win32 & Linux:
Upx (http://upx.sourceforge.net/)

Jim.