Ordered versus Unordered Map for Primitive Data Types
Abstract
A map in programming is an associative container consisting of some key value mapped to some element. C++ provides two types of map containers within the standard template library, the std::map and the std::unordered_map classes. As the name implies, the containers main functional difference is that the elements in the std::map are ordered by the key, and the std::unordered_map are not ordered based on their key. The std::unordered_map elements are placed into buckets based on a hash value computed for their key. This report will concentrate on the performance difference of these two containers using a primitive data type for the key.
Document Details
- Document Type
- Technical Report
- Publication Date
- Sep 01, 2015
- Accession Number
- ADA627127
Entities
People
- Tom Nealis
Organizations
- United States Army Armament Research, Development and Engineering Center