Computer Chess Club Archives


Search

Terms

Messages

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

Author: Angrim

Date: 22:11:49 02/25/03

Go up one level in this thread


On February 25, 2003 at 21:50:25, Matt Taylor wrote:

>On February 25, 2003 at 12:40:18, Uri Blass wrote:
>>
>>compiling the program takes a short time and it is no problem even to compile a
>>file with more than 5000 lines.
>>
>>Uri
>
>Assuming it stays around that level. However, with 5K LOC, my projects usually
>take more than a short time to compile. On my 1.4 GHz AthlonMP 1600 (note that I
>can only use 1 CPU in VC), it takes probably 10 seconds to completely rebuild
>projects around that size. Part of this is due to the fact that the compiler has
>to be spawned multiple times against multiple files. If I simply build changes,
>the entire process can take less than 3 seconds.
>
>5K LOC is a small project. As movei grows, it will get bigger and bigger. Using
>modules will save you compile time -- perhaps not now, but in the future.
>
>-Matt

While I certainly agree that 5K lines is a small project, I don't think
that compile time is likely to become a major issue for him. I expect
that by the time that movei gets large enough to be slow to build,
Uri will have a much faster computer which will make it fast to build.
  The far more important reason to use multiple files is increased
modularity and ease of debugging, which is much more important to me
than the trivial compile time speed gain that I get from having lots
of little files.  I like to be able for instance to swap out one
version of the eval for another while keeping everything else unchanged,
and then run a match between the two versions.  Or swap an old version
of my movegen in for the newest one, and see if it really
is faster with the new one.  Or, in the dreaded case that I make a
bunch of little changes to my program and a (non-trivial)bug shows up,
I can swap in the old version of each of the changed files one at a time,
and see which one the error was in.

Angrim



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.