[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #61912] Slow performance of complex()
From: |
Hg200 |
Subject: |
[Octave-bug-tracker] [bug #61912] Slow performance of complex() |
Date: |
Wed, 26 Jan 2022 01:11:04 -0500 (EST) |
Follow-up Comment #8, bug #61912 (project octave):
Maybe this is a too simple argument but: If i take the loop-code from the
original posting its runtime is 0.190 over here. The fastest way to exit from
data.cc is when only one argument is passed, that is complex:
if (nargin == 1)
{
octave_value arg = args(0);
if (arg.iscomplex ())
retval = arg;
else
N = 1e5;
val = 1i*pi;
tic;
for i = 1 : N
z = complex (val);
endfor
bm = toc
With this change the runtime is 0.183. Not much faster.
Additionally you can exchange complex() with other functions. For example
"isempty". Then the runtime is 0.168.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?61912>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #61912] Slow performance of complex(), Rik, 2022/01/24
- [Octave-bug-tracker] [bug #61912] Slow performance of complex(), Dmitri A. Sergatskov, 2022/01/24
- [Octave-bug-tracker] [bug #61912] Slow performance of complex(), Arun Giridhar, 2022/01/24
- [Octave-bug-tracker] [bug #61912] Slow performance of complex(), Rik, 2022/01/24
- [Octave-bug-tracker] [bug #61912] Slow performance of complex(), Rik, 2022/01/24
- [Octave-bug-tracker] [bug #61912] Slow performance of complex(), Rik, 2022/01/25
- [Octave-bug-tracker] [bug #61912] Slow performance of complex(), Rik, 2022/01/25
- [Octave-bug-tracker] [bug #61912] Slow performance of complex(), John W. Eaton, 2022/01/26
- [Octave-bug-tracker] [bug #61912] Slow performance of complex(),
Hg200 <=
- [Octave-bug-tracker] [bug #61912] Slow performance of complex(), Markus Mützel, 2022/01/26
- [Octave-bug-tracker] [bug #61912] Slow performance of complex(), Rik, 2022/01/26
- [Octave-bug-tracker] [bug #61912] Slow performance of complex(), Rik, 2022/01/26
- [Octave-bug-tracker] [bug #61912] Slow performance of complex(), Rik, 2022/01/28
- [Octave-bug-tracker] [bug #61912] Slow performance of complex(), Markus Mützel, 2022/01/30