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

[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/




reply via email to

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