Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: question about errors when I change my C code to C++

Author: Uri Blass

Date: 15:57:17 02/24/03

Go up one level in this thread


On February 24, 2003 at 18:44:30, Dann Corbit wrote:

>On February 24, 2003 at 18:21:53, Uri Blass wrote:
>
>>On February 24, 2003 at 18:00:25, Uri Blass wrote:
>>
>>>I see that I did not include it in the right order and now I have no problem.
>>>
>>>Uri
>>
>>Almost
>>
>>The only small problem is that I get slightly slower times(less than 1%
>>difference but I do not like it)
>>
>>344.90 seconds against 346.86 seconds and also the time in the middle has the
>>same pattern.
>>
>>I think that the exe is simply slightly slower than the previous exe because I
>>usually get more similiar results with the same code.
>
>C++ offers no real performance boost.
>
>For either C or C++ with the MS VC++ compiler, simply select the option that
>says "Inline any suitable function" and you will get the same sort of inline
>benefit.
>
>Unless you check not to allow structured exception handling, you should see a
>small *decrease* in performance.
>
>The only real reason to use C++ instead of C is for the better abstraction level
>that is possible.
>
>Also, you will get approximately the same warnings for either C or C++ if you
>increase your warning level to the highest one.

The only reason that I decided to try C++ is inlining functions
I see that I do not need it because it seems to me based on looking at the help
that __inline in C is the same as __inline in C++ and I see no difference
between __inline and inline in C++.

I do not know how to select the option inline every suitable function and I now
only optimize for speed(I use VC++6).

Uri



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.