-
Notifications
You must be signed in to change notification settings - Fork 5
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
Julia code 6x slower than respective Python #8
Comments
So I have not updated the Julia package in a long time. Additionally, the c interface is to an older Dynamic Programming which is slower than the one currently in use for Python. |
@jdtuck I see that he is calculating the Karcher mean. Does the Python version use parallel processing by default (I know the Julia version does not)? |
It does not perform parallel processing by default as his number of sample points is <100. If his sample points >100 then it would kick of parallel processing. Also depending on the numpy version, there will also be openmp usage of the BLAS operations. |
Thank you for your reply! Compilation + execution is 12.5 s. When a run for the second time, it gives me 6.4 s.
I've uploaded some notebooks (Julia and Python) here ll-portes/ElasticRegistration_studies with the data and timing tests (studing-fdasrvf-Python-2021-11-28.ipynb for Python and studing-fdasrvf-JULIA-2021-11-28.ipynb for Julia). Remark - I'm glad to know that the Python version has the newer Dynamic Programming because I'm very comfortable in coding with Python (but not in Julia)! There is another issue linked with memory resulting in Python kernel crashing that I'll post at the fdasrvf Python channel. |
Hi,
I was using the Python version of the fdasrsf pkg. However, I tried to use the Julia version to see if I could speed up (or to get better memory management). I don't know if my example (attached) is correct, but to align the same data it took 6s-7s in Julia and 1s in Python. So, maybe there is something within the Julia code preventing it to be fast.
Remark: f.shape is just (100, 15) in the example.
The text was updated successfully, but these errors were encountered: