[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #63444] "if (COND)" is much slower than "if (a
From: |
John W. Eaton |
Subject: |
[Octave-bug-tracker] [bug #63444] "if (COND)" is much slower than "if (all (COND))" |
Date: |
Tue, 29 Nov 2022 22:32:52 -0500 (EST) |
Follow-up Comment #9, bug #63444 (project octave):
I tried with "NDArray A" and "const NDArray A" and the difference in execution
time is about the same but the percentage change is less significant when
using the non-const NDArray because the overhead of the indexing operation is
much higher.
It seems to me that we could do slightly better with a single loop that does
both operations but I don't know that it is worth the trouble.
Also, I guess we should be careful about the difference between "if (val)" and
"if (all (val))", not just when val might be empty but also if it might
contain NaN elements. I wouldn't have thought about the latter case before
today.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?63444>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #63444] "if (COND)" is much slower than "if (all (COND))", Rik, 2022/11/29
- [Octave-bug-tracker] [bug #63444] "if (COND)" is much slower than "if (all (COND))", John W. Eaton, 2022/11/29
- [Octave-bug-tracker] [bug #63444] "if (COND)" is much slower than "if (all (COND))", Rik, 2022/11/29
- [Octave-bug-tracker] [bug #63444] "if (COND)" is much slower than "if (all (COND))", John W. Eaton, 2022/11/29
- [Octave-bug-tracker] [bug #63444] "if (COND)" is much slower than "if (all (COND))", Rik, 2022/11/29
- [Octave-bug-tracker] [bug #63444] "if (COND)" is much slower than "if (all (COND))", Rik, 2022/11/29
- [Octave-bug-tracker] [bug #63444] "if (COND)" is much slower than "if (all (COND))", Rik, 2022/11/29
- [Octave-bug-tracker] [bug #63444] "if (COND)" is much slower than "if (all (COND))", John W. Eaton, 2022/11/29
- [Octave-bug-tracker] [bug #63444] "if (COND)" is much slower than "if (all (COND))", Rik, 2022/11/29
- [Octave-bug-tracker] [bug #63444] "if (COND)" is much slower than "if (all (COND))",
John W. Eaton <=