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

possible cythonization #31

Open
nucccc opened this issue Jan 9, 2023 · 2 comments
Open

possible cythonization #31

nucccc opened this issue Jan 9, 2023 · 2 comments

Comments

@nucccc
Copy link
Contributor

nucccc commented Jan 9, 2023

#29 ,as per the pull request, I note here some thoughts about cythonization.

By just declaring with cdef the integers i and j in the for loops it would be possible to improve a speed-up with a very limited code modification. Still that would require a cythonization (a .pyx file, importing cython, transpilation build and then importing the eventual .so extension... i suppose).

I leave it here as a side note, knowing that a quick benchmark allowed to have a 30% performance speedup in a benchmark I recall I made. I suppose the code already leverages at best numpy.

@cjekel
Copy link
Owner

cjekel commented Jan 14, 2023

I need to respond to #29 (comment)

Curious what happens to the cythonization if everything is written in cython, even the distance functions.

@nucccc
Copy link
Contributor Author

nucccc commented Jan 15, 2023

If you're interested I could open a branch (also in a fork of mine) with some cythonized code in dedicated folder, for intermediate evaluations. Hopefully I could do that in the upcoming week if I find the time

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

No branches or pull requests

2 participants