A name is an immutable string literal used for indexing associative containers (e.g., dictionary_t.) It has several performance guarantees that make it a preferred alternative to other string-based key types.
Definition at line 216 of file name.hpp.
static bool fast_sort |
( |
const name_t & |
x, |
|
|
const name_t & |
y |
|
) |
| |
|
static |
for use with sorting, e.g.:
std::sort(begin(c), end(c), adobe::name_t::fast_sort);
The implicit sort (operator<
) is lexicographical ("slow"), whereas fast sort leverages the runtime hash of the name_t to speed things up. The sort order is not guaranteed between processes or DLLs, nor is it guaranteed to be lexicographical. It is only guaranteed to be stable for the lifetime of the process.
- Complexity Guarantee(s)
- O(1)
Definition at line 272 of file name.hpp.