Skip to content

Make shuffle pyx functions noexcept#477

Merged
jakirkham merged 6 commits intozarr-developers:mainfrom
martindurant:shuffle_gil
Oct 17, 2023
Merged

Make shuffle pyx functions noexcept#477
jakirkham merged 6 commits intozarr-developers:mainfrom
martindurant:shuffle_gil

Conversation

@martindurant
Copy link
Member

@martindurant martindurant commented Oct 10, 2023

Fixes #476

@jakirkham , like this? The functions don't actually return anything.

Do we have any process to determine which codecs release the GIL? Given the performance discussions, this could be imporant.

@codecov
Copy link

codecov bot commented Oct 16, 2023

Codecov Report

Merging #477 (975d45b) into main (1bc1e44) will increase coverage by 0.04%.
The diff coverage is n/a.

Additional details and impacted files
@@             Coverage Diff             @@
##             main      #477      +/-   ##
===========================================
+ Coverage   99.95%   100.00%   +0.04%     
===========================================
  Files          56        56              
  Lines        2241      2242       +1     
===========================================
+ Hits         2240      2242       +2     
+ Misses          1         0       -1     

see 2 files with indirect coverage changes

Copy link
Member

@jakirkham jakirkham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Martin! 🙏

IIUC adding noexcept should be sufficient here (looking at this Cython doc section)

martindurant and others added 3 commits October 17, 2023 10:41
Co-authored-by: jakirkham <jakirkham@gmail.com>
Co-authored-by: jakirkham <jakirkham@gmail.com>
@jakirkham jakirkham changed the title Make shuffle pyx functions return int Make shuffle pyx functions noexcept Oct 17, 2023
@jakirkham
Copy link
Member

Thanks Martin! 🙏

@jakirkham jakirkham enabled auto-merge (squash) October 17, 2023 20:03
@jakirkham jakirkham merged commit c28f5c9 into zarr-developers:main Oct 17, 2023
DimitriPapadopoulos pushed a commit to DimitriPapadopoulos/numcodecs that referenced this pull request Aug 10, 2024
* Make shuffle pyx functions return int

* Update numcodecs/_shuffle.pyx

Co-authored-by: jakirkham <jakirkham@gmail.com>

* Update numcodecs/_shuffle.pyx

Co-authored-by: jakirkham <jakirkham@gmail.com>

* Note shuffle pyx functions are `noexcept`

---------

Co-authored-by: jakirkham <jakirkham@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

_doShuffle: Cython performance hint regarding GIL usage

2 participants