Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: compiler question

Author: Dan Newman

Date: 01:28:15 05/08/00

Go up one level in this thread


On May 08, 2000 at 02:35:32, Landon Rabern wrote:

>On May 08, 2000 at 01:52:18, David Blackman wrote:
>
>>On May 08, 2000 at 00:32:39, Robert Hyatt wrote:
>>
>>>On May 07, 2000 at 19:27:11, Landon Rabern wrote:
>>>
>>>>When compiling with Maximize Speed on in release mode in MSVC++ 6.0 I run at
>>>>about 190,000 nps, but in DJGPP with max optimizations I can get around 330,000
>>>>nps in the same position.  Isn't Visual C++ supposed to be faster? Any ideas on
>>>>whats going on?
>>>>
>>>>Thanks,
>>>>
>>>>Landon W. Rabern
>>>
>>>
>>>I would suspect you are not getting all the MSVC optimizations turned on
>>>correctly.  It is clearly better than GCC...
>>
>>It does depend a bit on what the program is doing. There are apparently some
>>looks that GCC does a better job on. To get such a big advantage for GCC on a
>>whole program would be extremely unusual though. Is this a well-known program?
>>Otherwise it might be interesting to post a couple of small fragments that you
>>think are the "inside loops" of the program, so we can see if you are doing
>>anything unusual that might favour GCC.
>
>Well according to the profile, this block takes up the most time.
>

<snip>
>
>Thats a rather large block

Well, I didn't look very closely at the code, but I did notice the
malloc's and free's.  If this is in the search function (or anything
else that's frequently called), the malloc's and free's will probably
really cost you...  (OTOH, you are getting a pretty high node rate.)

It could be that MSVC's malloc and free are simply a lot more expensive
than DJGPP's.  Anyway, I'd try to eliminate the dynamic memory allocation...

-Dan.



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.