Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add noexcept declarations for Cython 3.0 #680

Merged
merged 1 commit into from
Jul 20, 2023
Merged

Add noexcept declarations for Cython 3.0 #680

merged 1 commit into from
Jul 20, 2023

Conversation

benfred
Copy link
Owner

@benfred benfred commented Jul 20, 2023

This fixes a large performance regression with many of the CPU models.

For instance when training the ml100k dataset, when compiled with Cython 3.0.0:

  • Without this change
DEBUG:implicit:trained model 'bpr' in 69.49404716491699
DEBUG:implicit:trained model 'lmf' in 42.24160981178284
DEBUG:implicit:trained model 'als' in 120.11413407325745
  • With this change
DEBUG:implicit:trained model 'bpr' in 0.18895816802978516
DEBUG:implicit:trained model 'lmf' in 0.06523633003234863
DEBUG:implicit:trained model 'als' in 1.8809657096862793

Fixes #678

This fixes a large performance regression with many of the CPU models.

For instance when training the ml100k dataset, when compiled with Cython 3.0.0:

* Without this change
```
DEBUG:implicit:trained model 'bpr' in 69.49404716491699
DEBUG:implicit:trained model 'lmf' in 42.24160981178284
DEBUG:implicit:trained model 'als' in 120.11413407325745
```

* With this change
```
DEBUG:implicit:trained model 'bpr' in 0.18895816802978516
DEBUG:implicit:trained model 'lmf' in 0.06523633003234863
DEBUG:implicit:trained model 'als' in 1.8809657096862793
```

Fixes #678
@benfred benfred merged commit 0db47c7 into main Jul 20, 2023
@benfred benfred deleted the noexcept branch July 20, 2023 18:34
@xiangb xiangb mentioned this pull request Aug 21, 2023
@benfred benfred added the bug label Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Performance regression with Cython 3.0.0
1 participant