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: Mon, 24 Jan 2022 19:41:11 -0500 (EST)

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

Finally found a situation, vectors for both RE and IM parts, where complex is
faster.


N = 1e5;

val = rand (1e4, 1);

tic;
for i = 1 : N
  #z = complex (val, val); 
  z = val + 1i*val; 
endfor
bm = toc


Timings:
complex() : 2.5 seconds
multiply  : 3.3 seconds


(file #52722, file #52723)
    _______________________________________________________

Additional Item Attachment:

File name: bm_complex2.m                  Size:0 KB
    <https://file.savannah.gnu.org/file/bm_complex2.m?file_id=52722>

File name: bm_complex3.m                  Size:0 KB
    <https://file.savannah.gnu.org/file/bm_complex3.m?file_id=52723>



    _______________________________________________________

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]