|
From: | John W. Eaton |
Subject: | [Octave-bug-tracker] [bug #56752] Performance slowdown from version 3.2.4 through to current dev branch |
Date: | Fri, 13 Sep 2019 00:29:22 -0400 (EDT) |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0 |
Follow-up Comment #43, bug #56752 (project octave): The shallow copy of the array isn't the real problem. It's that even if there is no other copy and the reference count is always 1, the usual array indexing operations for non-const instances of our copy-on-write classes must always check the reference count. The NoAlias class provides a way to override that choice, but it is risky because we have to know that there will never be a copy. If we know that, then I think it makes sense to just use xelem explicitly. Another way to avoid the reference count checks is to use const copy-on-write objects wherever possible. We probably don't follow that advice as much as we should in the Octave sources. _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?56752> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |