Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: C++ slow?

Author: Bruce Moreland

Date: 13:06:23 07/02/99

Go up one level in this thread



On July 02, 1999 at 15:07:33, Sven Reichard wrote:

>In a recent thread it was stated that current Basic compilers produce code that
>is "slightly faster than C (and a lot faster than C++)".
>Could someone point out to me why C++ per se is slow? I had programmed in C for
>a while before learning C++, and I didn't detect any significant differences in
>performance. However, with C++ I spent more time designing and less time
>debugging (which makes it preferable to me :) ).
>I recently started implementing a generic engine for two person zero sum games
>(in C++). I would like to know if it is worth the effort, or if the language
>slows it down too much.

My advice to those who are overly concerned about speed is to not be in such a
hurry.

Speed as a feature of computer programs is over-rated.  In almost every bread
and butter application it's much more important that the program works properly,
and that the programmer has an entertaining time writing the thing and doesn't
have fantasies about hanging himself if he has to work on it again next year.

If attention is paid to speed in speed critical areas, those few that really
exist, I don't see why C++ needs to be slower than C.

In chess programs, there are a lot of places where speed is important, but I'd
gladly go 10% slower overall if I never had to worry about bugs, and had a
flexible code base from which I could perform experiements which might improve
speed or strength.

bruce



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.