octave-maintainers
[Top][All Lists]
Advanced

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

Re: Remove all do_inplace* logic from C++


From: John W. Eaton
Subject: Re: Remove all do_inplace* logic from C++
Date: Thu, 16 May 2013 02:04:50 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.11) Gecko/20121122 Icedove/10.0.11

On 05/16/2013 01:32 AM, Olaf Till wrote:
On Wed, May 15, 2013 at 11:36:46AM -0400, Jordi GutiƩrrez Hermoso wrote:
<snip>
Any objection to completely removing all of the inplace logic from C++?

What is if the lhs operand (m-code) contains, e.g., indexing
operations? E.g.

a(id1, id2, id3) += b;

against

a(id1, id2, id3) = a(id1, id2, id3) + b;

or even

c{id4, id5, id6}(id1, id2, id3) += b;

against

c{id4, id5, id6}(id1, id2, id3) = c{id4, id5, id6}(id1, id2, id3) + b;

or even more complicated?

Have you checked whether Octaves do_inplace code you speak of is able
to spare the double evaluation of the index operation? If it is, this
would be surely more than an optimizing compiler could achieve,
wouldn't it?

No, the code Jordi is looking at is at a much lower level than indexing operations in the scripting language.

The A op= B operators in Octave are nothing more than syntactic sugar. They are always exactly equivalent to A = A op B.

jwe




reply via email to

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