[Bug fortran/25708] Module loading is not good at all

pault at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed May 2 07:41:00 GMT 2007



------- Comment #8 from pault at gcc dot gnu dot org  2007-05-02 08:41 -------
(In reply to comment #7)
> BTW, here's some slides describing NAG:s experience, they use lazy symbol
> lookup combined with caching, and claim it is up to 1000 times faster than
> non-lazy (which gfortran uses AFAICS).
> http://www.fortran.bcs.org/2007/jubilee/f50.pdf
Janne,

I had noted that, when I read Cohen's talk.  Your comment led me to research
lazy and non-lazy symbols and to have a think about how they might apply to
module.c.

What I had a mind to do was to load and decode the .mod file into its own
namespace. Then, use association consists of copying and, if needed, renaming
the symbols into the target namespace.  This requires that the formal and other
secondary namespaces be scanned to see if they are required.

The lazy symbol mechanism would retain the existing pointer_info tree for each
module , resetting the NEEDED and USED flags before use.  The existing loading
mechanism could then be recycled.

It is my belief that building module namespaces will involve the least work and
will be the most efficient way to load symbols but I will need to analyse this
more thoroughly.  In either case, symbols have to be copied.

Watch this space - I am working on it, albeit slowly.

Paul


-- 


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



More information about the Gcc-bugs mailing list