Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Chess Engine optimizer with source code for the Borland compiler

Author: Scott Gasch

Date: 16:31:36 04/12/05

Go up one level in this thread


This thing is just hacking around the PE header files of your image.  From the
website:

   1) All relocations are cut.

This will cause your image not to load if something else is at its preferred
load point already.  This is probably safe for EXEs but for DLLs this is not
wise at all.  Note you can also accomplish the same thing with a linker flag
(/FIXED, I believe).

    2) Alignment of PE header is reduced to the minimal secure value (16 bytes),
all rubbish is deleted from the header as well.

The alignment of the PE header is not a speed issue except maybe for some OS
loader code.  As for the "rubbish" he deletes, the size of the PE headers are
fixed... so the statement makes no sense.  Deleting "rubbish" and replacing it
with zero bits isn't going to speed anything up.

    3) Alignment of header and all unreferenced sections is reduced to its
minimal secure value (200h bytes). Only the presense of unreferenced sections is
deleted, records about them in headers are not deleted, so after loading of the
file into the memory it will be the same as the one before optimization.

Every win32 linker I've ever seen sets the memory alignment to 0x1000 bytes on
i386 (page size) and file alignemnt to 0x200 bytes (typical size of a disk
sector) already.

Removing subsections from the image is probably smart... it will reduce your
memory footprint.  But it can also change the layout of the image and cause
cache issues.  So its anyone's guess as to the end effect.

Also note that if you have good linker settings you will not have unused
sections in your image.  If you do, mark them as discardable when you link.

So all in all I'm guessing this program is completely useless at best.

Scott



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.