8000 MAINT Use Cython memoryviews · Issue #10624 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content
MAINT Use Cython memoryviews #10624
Closed
Closed
@rth

Description

@rth

Currently a fair amount of Cython code uses the numpy buffer interface.

When possible, it could be worth migrating some of it to the typed memoryviews Cython interface that has lower overhead and could result in some performance improvements [1], [2]. This would also allow to release GIL more frequently which would be positive for parallel computations with the threading backend.

I'm not saying that it makes sense to use memoryviews everywhere, and there are subtle differences between the two (possibly related #7059 (comment)). Just opening this issue to track progress.

For instance, sklearn/utils/sparsefuncs_fast.pyx could be a place to start.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0