Closed svank closed 7 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
b07fef5
) 93.62% compared to head (117bdbc
) 93.62%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Thanks!
Fixes #416
Implements Cython's suggested performance fixes and removes the "performance hint" warnings. Looks like new behavior in Cython 3.0, to ensure proper handling if a Python exception is raised within a function. Since these subroutines don't call any Python code directly, no Python exception can be raised, so we can add
noexcept
flags and avoid Cython checking for an exception after every function call. These changes gain a bit of speed in a real-world benchmark, but it looks like just speed that we lost when changing to Cython 3.I also fixed a few warnings (removed an unused function, compiler worried about an uninitialized variable, explicitly set
language_level
to the new default, and added flag to not use the deprecated numpy api,) so nowdeforest.pyx
builds without any warnings on my computer.Performance of the adaptive code is indeed relevant to my interests---thanks for pointing this out, @astrofrog