On Apr 1, 11:23 am, Robert Bradshaw <[EMAIL PROTECTED]>
wrote:
> On Apr 1, 2008, at 10:45 AM, Nick Alexander wrote:
>
> > On 1-Apr-08, at 10:36 AM, Gary Furnish wrote:
>
> >> Right now pulling in group theory may end up pulling in calculus.
> >> There are similar issues all over with really tight coupling
> >> between subsystems.  It ought to be possible to use group theory
> >> (maybe without a feature or two) without calculus and vice versa.
>
> > This isn't really a global namespace pollution issue, but it is a
> > concern.  One way to deal with this is to make (more) imports
> > function or class local.  I'm not sure if there are performance
> > penalties for this, especially in Cython.  Can anyone say?
>
> Importing locally takes time, even if just to discover the cached
> import if it has already been done once. This is independent of
> whether or not the file is in Cython (though the relative overhead
> may be much greater for a Cythonized function).

For instance, see https://bugs.launchpad.net/cython/+bug/155076, where
I measure the cost of a local import as around 2 microseconds.

> The order in which things are imported is really, really crazy right
> now, as anyone trying to hunt down an (easy to trigger) circular
> references can attest to. It would be great if this could be cleaned
> up, both for developing Sage and for making things more modular so
> other projects can benefit from them.

Yes, this would be great!

It seems like it would be very difficult to fix, though.

Carl
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to