qb
2.0.0.0
C++17 Actor Framework
|
Optimized unordered map implementations. More...
#include <string>
#include <map>
#include <ska_hash/unordered_map.hpp>
#include <unordered_map>
Go to the source code of this file.
Classes | |
class | qb::string_to_lower |
Utility class for case-insensitive string operations. More... | |
class | qb::icase_basic_map< _Map, _Trait > |
A case-insensitive map implementation. More... |
Typedefs | |
template<typename K, typename V, typename H = std::hash<K>, typename E = std::equal_to<K>, typename A = std::allocator<std::pair<const K, V>>> | |
using | qb::unordered_flat_map = ska::flat_hash_map<K, V, H, E, A> |
A high-performance flat hash map implementation. | |
template<typename K, typename V, typename H = std::hash<K>, typename E = std::equal_to<K>, typename A = std::allocator<std::pair<const K, V>>> | |
using | qb::unordered_map = std::unordered_map<K, V, H, E, A> |
The primary unordered map implementation. | |
template<typename Value, typename _Trait = string_to_lower> | |
using | qb::icase_map = icase_basic_map<std::map<std::string, Value>, _Trait> |
Case-insensitive ordered map using std::map. | |
template<typename Value, typename _Trait = string_to_lower> | |
using | qb::icase_unordered_map |
Case-insensitive unordered map using qb::unordered_map. |
Optimized unordered map implementations.
This file provides optimized and specialized unordered map implementations for the QB framework. It includes high-performance alternatives to the standard unordered_map using flat hash maps from the ska_hash library, and case-insensitive string map implementations.
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
using qb::unordered_flat_map = ska::flat_hash_map<K, V, H, E, A> |
A high-performance flat hash map implementation.
This is a type alias for ska::flat_hash_map which provides better performance characteristics than std::unordered_map for many use cases. It uses open addressing with robin hood hashing for better cache locality and performance.
K | The key type |
V | The value type |
H | The hash function type (defaults to std::hash<K>) |
E | The equality function type (defaults to std::equal_to<K>) |
A | The allocator type |
using qb::icase_map = icase_basic_map<std::map<std::string, Value>, _Trait> |
Case-insensitive ordered map using std::map.
Value | The value type |
_Trait | The trait class for string conversion (defaults to string_to_lower) |
using qb::icase_unordered_map |
Case-insensitive unordered map using qb::unordered_map.
Value | The value type |
_Trait | The trait class for string conversion (defaults to string_to_lower) |