This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: #import, #pragma once to be removed in 3.4
- From: Neil Booth <neil at daikokuya dot co dot uk>
- To: Geoff Keating <geoffk at geoffk dot org>
- Cc: Zack Weinberg <zack at codesourcery dot com>, gcc at gcc dot gnu dot org
- Date: Thu, 6 Feb 2003 22:59:12 +0000
- Subject: Re: #import, #pragma once to be removed in 3.4
- References: <87lm0tjfsg.fsf@egil.codesourcery.com> <jmznp95c0l.fsf@desire.geoffk.org>
Geoff Keating wrote:-
> * Fixes a performance issue with long include search paths, by caching
> #include names rather than stat entries and using readdir to prime the
> cache; we found that a significant amount of time on our favourite
> testcase was being taken just in hash lookups in the stat cache, most
> of which returned negative results. It's common to have 50+ entries
> in the search path on Darwin, I think this test case had about 100 entries
> and includes several hundred distinct files in each compile, some many
> times.
I've been intending to fix this for a long time (in fact, I had a patch,
but it wasn't 100% and I think I long since deleted it). I'd like to
see what you've done.
You need to be careful about aliasing if you're just using the #include
name, otherwse you can do the wrong thing.
Neil.