Adobe Source Libraries 1.49.0
A collection of C++ libraries.
Loading...
Searching...
No Matches
name_t::fast_compare Struct Reference

#include <name.hpp>

Public Member Functions

bool operator() (const name_t &x, const name_t &y) const

Detailed Description

for use with sorting, e.g.:

std::sort(begin(c), end(c), adobe::name_t::fast_compare{});

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 280 of file name.hpp.

Member Function Documentation

◆ operator()()

bool operator() ( const name_t & x,
const name_t & y ) const

Definition at line 281 of file name.hpp.