in reply to Do multiple use statements across module dependency hierarchies require as little expense as multiple require statements?

(From the top of my head) As use is just a require + export wrapped in a BEGIN block at least the require part will be constant and C will get loaded only once. You will have (possibly) three exports depending on which symbols (if any) you wish to import in your namespace(s), but I think that will take very little time.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

  • Comment on Re: Do multiple use statements across module dependency hierarchies require as little expense as multiple require statements?
  • Select or Download Code

Replies are listed 'Best First'.
Re^2: Do multiple use statements across module dependency hierarchies require as little expense as multiple require statements?
by dsheroh (Monsignor) on Jan 10, 2008 at 20:10 UTC
    If C exports into all three namespaces, then I would expect this to involve three distinct exports (even if the exact same set of symbols is exported each time) because the symbols are being exported into three distinct namespaces.