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

[Bug default/19427] Intern the strings used in Libabigail



https://sourceware.org/bugzilla/show_bug.cgi?id=19427

Michi Henning <michi.henning at canonical dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |michi.henning at canonical dot com

--- Comment #3 from Michi Henning <michi.henning at canonical dot com> ---
Not that this is any of my business :-)

The 2% speed difference is insignificant. No-one will care.

The memory savings are nice, but not *that* huge (around 7%). I'd be inclined
to make this kind of change only if the impact on code complexity and
maintainability is low.

I've worked with code bases that create their own string implementation in the
past and, usually, it creates more problems than it solves. Often, the problem
ends up being that the replacement cannot be easily exchanged with std::string
and vice-versa, and then ends up costing more than it saves. So, whenever I see
a string replacement class, I tend to look twice.

I don't know whether you can use boost in your code. If so, boost::flyweight
might be a useful approach.

-- 
You are receiving this mail because:
You are on the CC list for the bug.