[Xapian-tickets] [Xapian] #785: Use std::string_view whenever possible
Xapian
nobody at xapian.org
Thu May 9 07:17:26 BST 2019
#785: Use std::string_view whenever possible
-------------------------+-------------------------
Reporter: Kronuz | Owner: olly
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: Other | Version:
Severity: normal | Resolution:
Keywords: | Blocked By:
Blocking: | Operating System: All
-------------------------+-------------------------
Comment (by olly):
The other way to attack this would be from the bottom up - find hot spot
cases where substrings of `std::string` objects are created or
`std::string` objects are created from buffers just to pass them to lower-
level internal functions that require data in a `std::string`. We almost
never use `substr()` to make a substring (there are only 8 uses in core if
you ignore the test suite and development tools), so this means looking
for places that call `std::string` constructors a lot in profile data.
--
Ticket URL: <https://trac.xapian.org/ticket/785#comment:4>
Xapian <https://xapian.org/>
Xapian
More information about the Xapian-tickets
mailing list