Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: for compiler and CPU experts: a very MYSTERIOUS problem!

Author: martin fierz

Date: 01:19:32 12/12/03

Go up one level in this thread


On December 11, 2003 at 12:06:53, F. Huber wrote:

>Hello!
>
>Since more than one week I´ve now a problem, which is really _strange_:
>
>Immediately after the release of my new ChestUCI version 3.0 I´ve got
>a response of some chess friends, that this new version is constantly
>slower than the last one (ver.2.8) by 8-10%. So I tested it myself on
>my new system (Pentium-IV 2.66), but I couldn´t confirm that - I got
>_absolutely identical_ solution times with this new version as with
>all previous ones!
>After some more tests we found out, that this 10% slowdown ONLY occurs
>on AMD-processors - NOT on Intel-CPUs !?
>And furthermore: the ´reason´ for this mysterious behaviour is not in
>my own ´ChestUCI´ (written in Borland Delphi), but in ´Chest´ itself
>(from Heiner Marxen),  which is written in ANSI-C and modified by me
>(only some additional file output!) for better communication with my
>UCI-interface and compiled with MS-VC++ 6.0.
>
>So what has changed in ´Chest´ from 2.8 to 3.0?
>
>1) I´ve included a few improvements and corrections from newer source
>files, which Heiner has sent me some time ago - but these were really
>_minor_ changes: absolut nothing that could explain a slowdown of Chest!
>(I´ve already emailed Heiner, but he also has no idea, how his small
>changes could have such an effect - and furthermore _only_ on AMD-CPUs)
>
>2) I´ve added a few additional commands (file output) to Chest, but normally
>these are not even executed at all - only if you really request them by
>setting a special engine option. So also my own changes could not explain
>this slowdown.
>
>What has NOT changed?
>
>1) I´ve _definitely_ NOT changed ANY compiler options!
>I tested this again and again, and I´m absolutely sure about this.
>Furthermore (since I´m not an expert in ´C´) I always compile(d) Chest
>with the compilers default settings (of course ´optimized for speed´,
>but that _is_ the default setting).
>
>2) The size of the EXE-file (´WinChest.exe´) has NOT changed - not even
>a single byte! (no big surprise, since all changes were rather small)
>
>3) And most important: as I mentioned above - the execution times on
>Intel-processors did NOT change at all !!
>
>Now, what have I tried?
>
>Within the last week I´ve exactly compared the new source code with the
>old one and searched for any possible errors - no success!
>Since I´ve no actual AMD-system I took my old one (AMD-K6/200MHz), which
>showed the same ´slowdown´ effect, made dozens of small changes in Chest
>(e.g. taking back some of the new changes) and recompiled it - no success!
>Once it seemed that I had found a solution (at least on my old K6 it was
>much faster again), but after having sent this new version to my friends,
>they said: "NOT faster, even slower!" - so this AMD-K6 seems not to be
>comparable with modern Athlons at all.
>
>And now I´ve really reached a point, where I have no further ideas, what
>else I could try. :-((
>Since here are lots of experts, maybe someone will know a solution for
>this strange problem - or at least could give an explanation for this
>mysterious slowdown effect on AMD-CPUs.
>(What I´m really angry about is not this slowdown itself - because those
>AMD´s are anyway faster for chess than Intel´s - but the fact, that I
>don´t know ´WHY?´. And as long as this question is not answered, there´s
>still the bad feeling of ´maybe I´ve indeed made some error anywhere?´.)
>
>So hoping to get some ´good´ answers, ;-)
>my best regards,
>Franz.

hi franz,

i assume you are now using those virtualalloc functions instead of malloc? i
found sometimes that this can make a performance difference, i don't remember it
being 10%, but still - you could try replacing the virtualalloc with malloc
again and see whether that is (part of) the problem. although, i found this on
an intel CPU...
of course, if you don't use virtualalloc you have this limitation of 256MB.

cheers
  martin



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.