This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch to gcc/Makefile.in for fastcompare* targets [take 2]
On Sat, Sep 20, 2003 at 01:16:10AM -0400, Kaveh R. Ghazi wrote:
>
> I observed that the skeleton of the "compare" shell fragments was
> identical among the "slow", "gnu" and my new "fast" variant. There is
> no need to repeat it three times. I merged them all into one to make
> it more maintainable by inserting a case stmt inside the for loops to
> fork off the appropriate cmp magic based on $@.
When I added the configure-time switching between the compare methods,
I thought about doing a merge along these lines, but wondered about the
speed impact of doing a case statement on every file. Pity the shell
can't determine that the result will always be the same, and hoist the
case statement out. :-)
I don't have approval authority for this change, but it looks good to me.
--
Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it.
- Brian W. Kernighan