Releases: DavidLeeds/hashmap
Releases · DavidLeeds/hashmap
Hashmap v2.1
Highlights:
- Extended the Hashmap interface, adding the following functions to address previous limitations and make usage more expressive:
hashmap_empty()hashmap_contains()hashmap_iter_find()hashmap_insert()
- Rewrote unit tests using the C++ Catch2 framework
- Addressed some portability issues by tweaking functions (e.g. use
rand()instead ofrandom()) and updated the default language standard in CMake. - Updated the readme to reflect the new functionality and better explain how to integrate with an existing CMake project.
Note that this release should be backward compatible with code written against v2.0.
Hashmap v2.0.3
Maintenance release for v2.0.
- Address potential Xcode static analyzer warning.
- Include
stdboolandstddefheaders as needed. - Update CI to build with Clang 14.
Hashmap v2.0.2
Minor project updates:
- Fixed a typo in the
hashmap_collisions()macro. - Moved example into a dedicated directory and added a new CMake option:
HASHMAP_BUILD_EXAMPLES. - Now including examples in CI build.
- Quoted internal header includes to facilitate embedding the source into another build.
- Updated the readme to include tutorial style examples.
Hashmap v2.0.1
Maintenance release for v2.0.
- Fixed build with Clang compiler. Removed struct definition in
forloop in thehashmap_foreachmacros. - Defined
HASHMAP_BUILD_TESTSCMake option and set to OFF, by default CMAKE_BUILD_TYPEis now Release, by default- Updated README
Hashmap v2.0
Hashmap 2.0 Highlights:
- New generic and type-safe API. We no longer need to use a macro to generate type-safe wrapper functions.
- Improved linear probing algorithm. The previous algorithm could fail on insert, rehash, or remove if a particularly poor hash function was provided. The new algorithm can never fail, even with a worst-case hash function. This adds user confidence and reduces failure modes.
- Added a supplemental hash function. Linear probing is especially sensitive to clustering due to poor hash functions. Since the hash function is user-supplied, adding a supplemental hash function provides more consistent performance.
- Now, always provide hashmap statistics API with no additional overhead to ordinary hashmap operations.
- Now, do lazy allocation on init. We reserve no memory on the heap until the first item is added.
- Default hashmap size is reduced to 128 elements.
- A hashmap_reserve() function was added to pre-allocate the hashmap.
- hashmap_foreach macros have been added to hide the complexities of iterator usage and streamline iteration.
Hashmap v1.0.1
Maintenance release for v1.0. This primarily consists of CMake improvements. This is the last planned code change to v1.
Version 2.0 will include incremental improvements to the core algorithm and a templated API.
Hashmap v1.0
This is the stable version of the hashmap data structure that uses a generic (void *) API with macros to declare type-specific wrapper functions.
Version 2.0 will include the same core algorithm, but a templated API.