Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: question about optimizing

Author: Gerd Isenberg

Date: 15:56:05 07/11/03

Go up one level in this thread


Uri, first of all, if the compiler is smart enough, the resulting asm code is
the same or similar and you may leave it as it is.

You may put a breakpoint "instruction"

__asm int 3

directly before a codeline to inspect asm. Run the release version with debugger
and inspect the assembler code after break. If there are some shl or leas before
the bitwise or/and ...
You may also generate assembler listings with the compiler.

Otherwise, making a backup should be a good idea.

Simply change the declaration of "directsee" from "int" to int32/shortint16
union type.

No let the compiler do some work - put the string into clipboard, goto to next
errornous line, and paste the "int"-union name behind ]. If you have common
index names for "target", replace  "directsee[target]" by eg. "SOMEUNIQUE_NAME".
Then you replace "SOMEUNIQUE_NAME" by "directsee[target].int32name".

If in all files replaced, compiler should happy - test carefully and search for
"<<(s<<4)" like pattern in assigments to "directsee", replace ".int32name" by
".int16name[s]" and delete "<<(s<<4)".

Gerd



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.