#import, #pragma once to be removed in 3.4
Neil Booth
neil@daikokuya.co.uk
Thu Feb 6 22:59:00 GMT 2003
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.
More information about the Gcc
mailing list