Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Why idempotent?

Author: Sanjiv Karnataki

Date: 18:49:15 02/14/00

Go up one level in this thread


On February 14, 2000 at 21:06:26, Dann Corbit wrote:

>On February 14, 2000 at 20:47:20, Sanjiv Karnataki wrote:
>
>>On February 14, 2000 at 17:00:52, Dann Corbit wrote:
>>
>>>I compile this:
>>>/*
>>>** This strange little beastie has only one purpose:
>>>** To allow the compiler to inline like a madman.
>>>*/
>>>#include "search.c"
>>>#include "board.c"
>>>#include "data.c"
>>>#include "eval.c"
>>>#include "main.c"
>>Hi,
>>
>>I didn't really understand this post. Could someone please explain:
>>
>>a) the term idempotent as it applies to compilers etc. in this context
>
>It means that an include file only appears once, no matter how many times you
>reference it -- that time being the first one.  So if I do this:
>#include <stdio.h>
>#include <stdio.h>
>#include <stdio.h>
>#include <stdio.h>
>it is the same this as this:
>#include <stdio.h>
>
>>b) why is this method of including all c files into a single file better?
>It's something that is helpful for some compilers that can only inline functions
>that they can see and allows for a few somewhat better optimizations.
>
>For some really good compilers it is a waste of time.
>
>>Thank you
>>
>>Sanjiv.

I use VC++ 6.0 for my amateur program. would this technique help or is VC++
smart enough to make it a waste of time ?

Thank you again.

Sanjiv.



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.