Skip to content

About

A HashMap impl by C++

Resources

Stars

1 star

Watchers

1 watching

Forks

Repository files navigation

HashMap CPP

C++

 _   _              _      __  __                 __ _  __ __     ____    _    ____               
| | | |  __ _  ___ | |__  |  \/  |  __ _  _ __   / /| |/ / \ \   / /\ \  | |  / ___|   _      _   
| |_| | / _` |/ __|| '_ \ | |\/| | / _` || '_ \ / / | ' /   \ \ / /  \ \ | | | |     _| |_  _| |_ 
|  _  || (_| |\__ \| | | || |  | || (_| || |_) |\ \ | . \    \ V /   / / | | | |___ |_   _||_   _|
|_| |_| \__,_||___/|_| |_||_|  |_| \__,_|| .__/  \_\|_|\_\    \_/   /_/  | |  \____|  |_|    |_|  
                                         |_|                             |_|                      

This C++ library provides an efficient HashMap implementation designed to offer higher efficiency than the standard library std::unordered_map when dealing with large datasets, while being on par with the efficiency of std::map. Additionally, the library can be easily included by simply importing the header file, without the need for complex installation or configuration processes.

Features

  • High Performance: The HashMap implementation is optimized to maintain high efficiency when processing large-scale data.
  • Simple Inclusion: Just include the header file, no need for cumbersome setup or configuration.

BenckMark Test

git clone https://github.com/Jungle430/HashMap_CPP.git
cd HashMap_CPP
git submodule init
git submodule update
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j$(nproc)
HASHMAP_CPP

Test effect

Run on (16 X 3293.84 MHz CPU s)
CPU Caches:
  L1 Data 32 KiB (x8)
  L1 Instruction 32 KiB (x8)
  L2 Unified 512 KiB (x8)
  L3 Unified 16384 KiB (x1)
Load Average: 2.40, 1.76, 1.38
-------------------------------------------------------------------------
Benchmark                               Time             CPU   Iterations
-------------------------------------------------------------------------
CustomHashMapBenchmark         3882636393 ns   3879073300 ns            1
CustomStdUnorderedMapBenchmark 7883063037 ns   7883028200 ns            1
CustomStdMapBenchmark          4078177020 ns   4078161000 ns            1

-------------------------------------------------------------------------

Run on (20 X 3541.01 MHz CPU s)
CPU Caches:
  L1 Data 32 KiB (x10)
  L1 Instruction 32 KiB (x10)
  L2 Unified 512 KiB (x10)
  L3 Unified 32768 KiB (x1)
Load Average: 29.15, 29.90, 26.38
-------------------------------------------------------------------------
Benchmark                               Time             CPU   Iterations
-------------------------------------------------------------------------
CustomHashMapBenchmark         4668446508 ns   4666786099 ns            1
CustomStdUnorderedMapBenchmark 7052167919 ns   7050251066 ns            1
CustomStdMapBenchmark          5843635374 ns   5842357489 ns            1

About

A HashMap impl by C++

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages