Skip to content
Snippets Groups Projects
Commit d92ff23f authored by Marco Clemencic's avatar Marco Clemencic
Browse files

use boost::string_ref to hold Property name and documentation

The use of boost::string_ref (to be replaced by std::string_view) reduce
significantly the space required by Property, avoiding pointless
duplications in memory (see GAUDI-1229).

With the `profile_Property` executable I measured a reduction of a
factor 2 in both size (272 -> 128 bytes) and time (0.2 -> 0.1 us) for
each created Property (always the same name and doc).

The drawback of the approach is that if we pass a temporary string to the
Property constructor we get undefined behaviour.
parent 6a4e61c0
No related branches found
No related tags found
1 merge request!182modernization of Property
Showing
with 150 additions and 129 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment