[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-patch-tracker] [patch #10147] interpreter: Avoid string construc
From: |
John W. Eaton |
Subject: |
[Octave-patch-tracker] [patch #10147] interpreter: Avoid string construction |
Date: |
Wed, 22 Dec 2021 09:38:35 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 |
Follow-up Comment #4, patch #10147 (project octave):
The first change seems OK, at least in functions that are called many many
times, but I'm not interested in changing all Octave code to use static const
std::string objects for every string literal. The context matters. For
example, there is no need for it in something like
if (some_error_condition)
error ("...");
I don't think the other two changes are needed. I'd rather avoid adding
things like "m_empty_string" member variables or const reference for ordinary
local variables. Shouldn't std::move be used in those instances anyway, or
does something prevent that from happening?
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/patch/?10147>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/