Computer Chess Club Archives


Search

Terms

Messages

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

Author: Uri Blass

Date: 23:40:08 02/25/03

Go up one level in this thread


On February 26, 2003 at 01:11:49, Angrim wrote:

>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


5000 lines is not all the project and at least one of my files has more than
5000 lines.

I did not calculated the time that I need to rebuild my project(I think it is
less than 10 seconds for total number of about 15000 lines)
but I think that 10 seconds for compilation is no problem.

Even if I use 1 minute for compilation it still means that more than 90% of the
time is used for other things.

I know nothing about cache optimization.
If I remember correctly
I remember that christophe suggested to use a file of the important parts to put
in the cache(something like the small parts that are used for more time).
I also remember that in that discussion some months or some years ago that Bob
Hyatt claimed that every programmer does it but I have no idea how to do it.

I have no idea how much memory is used by the computer for different parts and I
have no idea how to know it.

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.