Skip to content

_doShuffle: Cython performance hint regarding GIL usage #476

@jakirkham

Description

@jakirkham

Am seeing the following performance hint from Cython regarding GIL usage in _doShuffle (due to exception raising). Would be good to address

performance hint: numcodecs/_shuffle.pyx:11:6: Exception check on '_doShuffle' will always require the GIL to be acquired. Possible solutions:
	1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
	2. Use an 'int' return type on the function to allow an error code to be returned.
performance hint: numcodecs/_shuffle.pyx:23:6: Exception check on '_doUnshuffle' will always require the GIL to be acquired. Possible solutions:
	1. Declare the function as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
	2. Use an 'int' return type on the function to allow an error code to be returned.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions