Tracker for hotspots to move to cython
Summary
We have some hotspots in the code base, that are stable and "leafs" in the codebase.
We should convert them to cython when it makes sense.
This ticket is to track the spots in the code that are potential candidates and coordinate the work made in that regard.
Candidates
-
utils.url_directory_name -
_loader.types.Dependency -
_loader.loadelement._extract_depends_from_node -
_loader.loader.valid_chars_name -
element.Element.dependencies -
_loader.Loader._check_circular_deps -
_loader.Loader._sort_dependencies -
node._assert_symbole_name(needs inlining of the valid_chars)
Not necessarily hot, but easy to convert now
-
_loader.Loader._collect_element -
_options.optionpool -
_yaml.FileInfouse__cinit__instead of__init__ -
_yaml.ProvenanceInformationuse__cinit__instead of__init__
Other Cython-related optimizations
-
Stop allowing negative indexing or lists in Cython -
Use @cython.freelist()for heavily used extension types
Feel free to edit or comment on this issue to add more methods that should get cythonized.
Edited by Benjamin Schubert