This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: #import, #pragma once to be removed in 3.4


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]