http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40958

--- Comment #4 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> 
2011-11-28 14:24:02 UTC ---
Just for reference, compiling CP2K_2009-05-01.f90 results in 684 modules,
stracing yields something like 12000 calls to open, and 148'847'399 calls to
lseek.

Clearly anything reducing the number of seeks is likely to have a good impact
on compile time.

For this particular case, caching modules would help a lot as well. However,
our usual pattern is to have a single module per file, and all use statements
at the top of the module. Caching would be of little help for this style. An
efficient encoding of the information in the module would help.

The idea of writing the module compressed, and decompressing it as a big string
to memory for reading and parsing, seems appealing to me.

Concerning a change of format, it would be important to keep one of gfortran's
nice features, that is, the ability to use the modification time of the .mod
files to avoid recompilation cascades. If .mod files would contain a reference
to other .mod files (instead of containing the info directly), this property
might be at risk.

Reply via email to