[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #38628] bsxfun slow for complex
From: |
Vincent Gras |
Subject: |
[Octave-bug-tracker] [bug #38628] bsxfun slow for complex |
Date: |
Thu, 19 Nov 2020 05:49:38 -0500 (EST) |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:82.0) Gecko/20100101 Firefox/82.0 |
Follow-up Comment #10, bug #38628 (project octave):
Hi, here is a piece of code that I found to be very slow in octave:
G = bsxfun(@times, eye(Nc, Nc), shiftdim(F, -2));
(dimensions for F (complex array) were 7x11189 and Nc was equal to 8,
computation time was 8.96s)
Then I found this discussion. I effectively managed to recover a normal
execution time using the following trick:
Gr = bsxfun(@times, eye(Nc, Nc), shiftdim(real(F), -2));
Gi = bsxfun(@times, eye(Nc, Nc), shiftdim(imag(F), -2));
G = complex(Gr, Gi);
(computation time down to 0.75s !)
That would be great however if the issue could be fixed in a later revision of
octave.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?38628>
_______________________________________________
Message posté via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #38628] bsxfun slow for complex,
Vincent Gras <=