[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Is transpose costless?

From: Rik
Subject: Is transpose costless?
Date: Mon, 15 Jul 2019 08:47:03 -0700


I had a question about optimization in the parser.  If I write

x = x.';

is that effectively a costless operation that simply swaps the first two
values of the dimension vector?  Or does Octave first create a temporary
intermediate (which is costless because of COW), but then the transpose
operator forces a deep copy to the intermediate, and then the final
assignment takes place (also potentially another deep copy).


reply via email to

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