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

Cython --> nanobind and C++ #43

Merged
merged 14 commits into from
Jul 20, 2024
Merged

Cython --> nanobind and C++ #43

merged 14 commits into from
Jul 20, 2024

Conversation

akaszynski
Copy link
Owner

@akaszynski akaszynski commented Jul 20, 2024

This PR converts the codebase from cython to C++. Reasoning:

  • ~25-50% performance improvement using C++ with nanobind vs. Cython.
  • Compatible with both numpy==2.0 and numpy<2.0
  • C++ is much easier to maintain than Cython.
  • scikit-build-core plays nicely with nanobind, meaning we can use CMake.

Bonus

  • Minor changes for numpy==2.0 compatibility.
  • Use ruff
  • Add even more typehints
  • Build using MacOS native architecture

@akaszynski akaszynski changed the title Cython --> nanobind + C++ Cython --> nanobind and C++ Jul 20, 2024
@akaszynski akaszynski merged commit a324ee4 into main Jul 20, 2024
7 checks passed
@akaszynski akaszynski deleted the feat/build-nanobind branch July 20, 2024 04:27
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.

1 participant