Code GenerationOptimizationenhancementgood first issuehelp wanted
Metriche repository
- Star
- (8663 stelle)
- Metriche merge PR
- (Merge medio 45g 12h) (52 PR mergiate in 30 g)
Descrizione
Cython has to know the qualified module name at compile time, so the absolute package path of a relative import is actually known at compile time. We cannot change the way relative first imports work in general, because they are actually looked up relative to the current package, but we can still speed up re-imports (which are actually not that uncommon). Cython can construct the qualified name of a relative module import at compile time and look that up in sys.modules (as done in the ImportDottedModule helper function for absolute imports).
Requires C / C-API knowledge.