Skip to content

Kostya1/CppBenchmark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

CppBenchLite

๐Ÿงช A lightweight, header-only C++ microbenchmarking library with optional multithreading and automatic iteration calibration.

๐Ÿ”ง Features

  • Simple API: cppbench::benchmark(...)
  • Optional multithreaded execution
  • Auto mode: dynamically determines the optimal number of iterations
  • No dependencies โ€” pure C++17
  • Easy to integrate into any project

๐Ÿ“ฆ Installation

Just copy include/cppbench.hpp into your project.

No build steps or external libraries needed.

๐Ÿš€ Example

#include "cppbench.hpp"

void task() {
    // your code to benchmark
}

int main() {
    cppbench::Config cfg;
    cfg.auto_iterations = true;
    cfg.threads = 4;
    cfg.min_total_ms = 300;

    cppbench::benchmark("Auto-parallel benchmark", task, cfg);
}

About

Simple benchmark tool for application

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published