-
Notifications
You must be signed in to change notification settings - Fork 41
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
draft: Cythonize #33
base: master
Are you sure you want to change the base?
draft: Cythonize #33
Conversation
Very nice! It's going to be until the weekend until I can comment in detail. I see this is a very minimal cython port. That's great! I'm curious what happens if you drop
and use cython to create this matrix? It might be slightly faster to calculate the distance when we need it, rather than creating the large matrix? Also, we may want to show performance improvements with respect to both the number of data, and the number of dimensions in the data. |
After your suggestion, I even modified the cython code for a hypothetized improvement by eliminating not the distances matrix I forgot to mention that as a case I'm actually working just on the frechet distance, but of course the cythonization can be then extended on all the other functions. Thank you for the attention and the work, |
Just a bump. I'm still very interested in this comparison, I've just been swamped lately! |
Nice bump adding dtw! I need to test this out asap. |
Ah yes, i just added a dtw comparison. Then i think the benchmark could be better organized, I would put some more work in it. I'm swamped too and thank you for the attention! Also if you ever need a quick voice discussion just let me know and we can keep in touch via google meet or something at a point, I'm based in Italy and right now I'm flexible with my schedule. |
I seem to be getting about a 40% improvement gain, that is not sensitive to the total amount of data. This is good! I think I should consider porting the entire library to cython. It would be nice to have both a cython and python version side by side, since the python version is slightly easier to read. Not sure what is the best way to have both...
|
Hi, in this period I could be a little bit busy, but I could find some time. Recently I red that Cython 3.0 was released, which uses heavily type hinting, and one could resort to type hints such as cython.int or cython.long to actually have types, I would give a look if one could could write pythonic code and then let Cython 3.0 transpile it with that performance gain. |
Good evening,
I provide in here a folder with an example of cython code and a benchmark, so that if you want to think about it you can find some material from which to start.
Inside the
simylaritymeasures
folder, there will be acy_simylaritymeasures
, in which i left only the cython code, scripts and quick documentation inreadme.md
to build it and run it.Hoping it can turn out to be of any utility,
Nuc