octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #61912] Slow performance of complex()


From: Rik
Subject: [Octave-bug-tracker] [bug #61912] Slow performance of complex()
Date: Wed, 26 Jan 2022 12:41:28 -0500 (EST)

Follow-up Comment #11, bug #61912 (project octave):

I tried one more syntax hoping that avoiding the Complex constructor would
save some time since the Complex NDArray already has zero-initialized
Complex() values.  But, it made maybe a 2% difference so not really worth it.


              for (octave_idx_type i = 0; i < re_val.numel (); i++)
                {
                result.xelem (i).real (re_val.xelem (i));
                result.xelem (i).imag (im_val.xelem (i));
                //result.xelem (i) = Complex (re_val(i), im_val(i));
                }



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?61912>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]