[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #51962] ++ and -- not same as +1 and -1
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #51962] ++ and -- not same as +1 and -1 |
Date: |
Fri, 8 Sep 2017 11:26:02 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0 |
Update of bug #51962 (project octave):
Category: None => Interpreter
Priority: 5 - Normal => 3 - Low
Item Group: Unexpected Error => Performance
Operating System: Microsoft Windows => Any
_______________________________________________________
Follow-up Comment #1:
Actually, for maximal performance use
A += 1
OR
A -= 1
In-place operators have been optimized so that a second copy is never created.
Even
A = A + 1
is not guaranteed not to create a temporary matrix. Octave may, and most
likely will, do
tmp = A + 1;
A = tmp;
for "A = A + 1".
The increment and decrement operators should map on to the in-place operators,
but they don't yet.
I'm lowering the severity because there is a simple work-around of using += or
-= operators.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?51962>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #51962] ++ and -- not same as +1 and -1, anonymous, 2017/09/07
- [Octave-bug-tracker] [bug #51962] ++ and -- not same as +1 and -1,
Rik <=
- [Octave-bug-tracker] [bug #51962] ++ and -- not same as +1 and -1, Mike Miller, 2017/09/08
- [Octave-bug-tracker] [bug #51962] "A++" assigns to 'ans' while "A += 1" and "A = A + 1" do not, Rik, 2017/09/08
- [Octave-bug-tracker] [bug #51962] ++ and -- not same as +1 and -1, John W. Eaton, 2017/09/08
- [Octave-bug-tracker] [bug #51962] "A++" assigns to 'ans' while "A += 1" and "A = A + 1" do not, Rik, 2017/09/08
- [Octave-bug-tracker] [bug #51962] "A++" assigns to 'ans' while "A += 1" and "A = A + 1" do not, Rik, 2017/09/09
- [Octave-bug-tracker] [bug #51962] "A++" assigns to 'ans' while "A += 1" and "A = A + 1" do not, Michael Godfrey, 2017/09/09
- [Octave-bug-tracker] [bug #51962] "A++" assigns to 'ans' while "A += 1" and "A = A + 1" do not, Mike Miller, 2017/09/09
- [Octave-bug-tracker] [bug #51962] "A++" assigns to 'ans' while "A += 1" and "A = A + 1" do not, Michael Godfrey, 2017/09/09
- [Octave-bug-tracker] [bug #51962] "A++" assigns to 'ans' while "A += 1" and "A = A + 1" do not, Rik, 2017/09/10
- [Octave-bug-tracker] [bug #51962] "A++" assigns to 'ans' while "A += 1" and "A = A + 1" do not, Mike Miller, 2017/09/10