-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Poor performance when using in-place operator for arrays #7726
Comments
Your |
I don't think #3400 is related (and it's closed), did you mean to link to a different issue? @johnmyleswhite is correct that your |
The issue number has been corrected: it is #3424. Are there any plans for having operations like |
There's the Devectorize package... It's not an easy problem. At least a few years ago when I last used Eigen, I found that I usually had to turn on some warning (can't remember the details now) so that I was notified when it was allocating memory behind my back. I frequently had to intervene manually or occasionally submit patches to Eigen. But if you're not dissuaded, expression-parsing is Julia's equivalent to template metaprogramming. So my bet is that your best hope is to contribute to the Devectorize package. |
Currently, Devectorize is working at the macro level. Without knowing type information severely limits its capability. I think staged functions would help a lot when it lands. I may do a major overhaul of Devectorize when this happens. |
Note that instead of |
The following code benchmarks the following operation
B = -A'
, where bothA
andB
are matrices. The first function uses in-place array operationB[:] = -A'
, while the second uses a combination of functionsBase.copy_transpose!
(why this function is not exported atBase
likecopy!
?) andscale!
, and the third a for-loop.The result below shows that the in-place version is considerably slower than using a simple for-loop:
I am aware of a similar issue #3424, which has been around for more than a year.
Is there any prevision for when this is going to be fixed?
Julia Version
The text was updated successfully, but these errors were encountered: