Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HWC Caches. LRU, LFU, Belady's optimal cache

How to run

./build/main/main <<< "2 6 3 3 1 2 1 2" # cache_size Nelem elem1 elem2 ...

output is

Cache type   N hits
Belady       3
LRU          3
LFU          1

Benchmark

input : uniform random integers [0: 100) with input size 100'000

statistics

To reproduce benchmarks one needs to build the project and run

./build/benchmark/benchmark
cd benchmark
gnuplot script.gp
open cache_hit_statistics.png

How to build: CMAKE

cmake -S . -B build -G Ninja \
  -DCMAKE_C_COMPILER=gcc-14 \
  -DCMAKE_CXX_COMPILER=g++-14

cmake --build build
ctest --test-dir build --output-on-failure

About

My_small_cpp_projects

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages