octave-maintainers
[Top][All Lists]
Advanced

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

Re: warnings shut off in ov.cc?


From: John W. Eaton
Subject: Re: warnings shut off in ov.cc?
Date: Wed, 16 Oct 2019 15:47:43 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

On 10/15/19 9:15 PM, Rik wrote:

It is possible to detect that a warning has been issued and avoid constant
folding, although the mechanism is clumsy.  This diff does it

Thanks for the patch. I made a similar change but used an unwind_protect object and did the same for array objects. I checked it in here:

  http://hg.savannah.gnu.org/hgweb/octave/rev/c3e24c82157f

To benchmark things, I created this function

[...]

So a 2% slowdown to add warning detection, but a 15% slowdown if constant
folding is removed altogether.  Although, let's be real, even if constant
folding is removed entirely the absolute difference is 2 microseconds which
isn't very meaningful.

A large array object might show a much larger difference, and I think it is worth doing the constant folding if possible.

jwe





reply via email to

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