Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: OOP - Is this possible?

Author: Tom Kerrigan

Date: 11:23:59 03/27/02

Go up one level in this thread


On March 27, 2002 at 12:22:13, Frank Schneider wrote:

>Hi,
>
>On March 27, 2002 at 06:25:12, Arshad F. Syed wrote:
>
>>I plan to write a chess program. I was wondering if it would be worthwhile to
>>use the OOP approach. I have visited some sites of chess programs using OOP. The
>>general consensus is that OOP would cause a big hit on the NPS.
>
>i don't think so. Putting code into c++-methods instead of
>c-functions does not make it slower. Of course you should be

Actually, I saw a ~10% performance hit when moving functions into classes with a
program I was working on a while back. I assume it's because of the extra "this"
argument that gets passed around.
-Tom



This page took 0.01 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.