https://github.com/neudinger/keys-values-bench
C++ benchmark of keys values containers with likwid as monitoring and benchmarking suite
https://github.com/neudinger/keys-values-bench
bash boost cmake cpp cpp17 likwid linux llvm pandas plotly python3 shell ubuntu
Last synced: 5 months ago
JSON representation
C++ benchmark of keys values containers with likwid as monitoring and benchmarking suite
- Host: GitHub
- URL: https://github.com/neudinger/keys-values-bench
- Owner: neudinger
- Created: 2023-05-03T10:29:22.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-03T10:37:07.000Z (almost 3 years ago)
- Last Synced: 2025-02-28T23:11:10.954Z (about 1 year ago)
- Topics: bash, boost, cmake, cpp, cpp17, likwid, linux, llvm, pandas, plotly, python3, shell, ubuntu
- Language: Python
- Homepage:
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Benchmark of c++ keys values containers with likwid
 
  
 
  
   
This project require C++ 17 due to the usage of [structured bindings](https://en.cppreference.com/w/cpp/language/structured_binding)
## Install commands
Required
- C++ Compiler gnu g++ or LLVM clang++
- [micromamba](https://mamba.readthedocs.io/en/latest/installation.html#micromamba)
```bash
mamba env create -f environment.yml
conda activate bench-env
export C_INCLUDE_PATH=${CONDA_PREFIX}/include
export CPLUS_INCLUDE_PATH=${CONDA_PREFIX}/include
```
```bash
# Sometime this is required for the compiler to find include and the libraries
# export C_INCLUDE_PATH=${C_INCLUDE_PATH}:${PWD}/libs/clang+llvm-13.0.0-x86_64-linux-gnu-ubuntu-20.04/include
# export CPLUS_INCLUDE_PATH=${CPLUS_INCLUDE_PATH}:${PWD}/libs/clang+llvm-13.0.0-x86_64-linux-gnu-ubuntu-20.04/include
# export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${PWD}/libs/clang+llvm-13.0.0-x86_64-linux-gnu-ubuntu-20.04/lib
# export LIBRARY_PATH=$LIBRARY_PATH:${PWD}/libs/clang+llvm-13.0.0-x86_64-linux-gnu-ubuntu-20.04/lib
```
- Download and install the required dependencies
```bash
./dl_lib.sh
```
- Build every binary
```bash
./build.sh
```
- Run every binary in ./binaries directory with likwid monitoring and write csv result in ./results/csv/
```bash
./run.sh
```
- Read csv to convert in eps, png, svg image performance chart
```
./read_results.sh
```
## Likwid simple usage
- Please use the `./run.sh`
```sh
# https://rrze-hpc.github.io/likwid/Doxygen/likwid-perfctr.html
likwid-perfctr -O -m -C S0:0 -g MEM_DP ./binaries/stencil_EIGEN_1D 10 1000 > EIGEN_1D.csv
likwid-perfctr -O -m -C S0:0 -g MEM_DP ./binaries/map_STD-3RK\=int64_t-MAP_VALUE\=k1 10 > map_STD\=int64_t-MAP_VALUE\=k1.csv
```
## MAP
Bench between most popular Key Value library
See some result [result](./result.md)
- [x] std::map
- [x] LLVM::map
- [x] LLVM::map_vector
- [x] boost::container::map
- [ ] [parallel-hashmap](https://github.com/greg7mdp/parallel-hashmap) (incoming)
- [ ] [sparsepp](https://github.com/greg7mdp/sparsepp) (incoming)