Skip to content

allvphx/bench-cplusplus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bench Cplusplus

Welcome to Bench Cplusplus, a repository dedicated to benchmarking various aspects of C++ code, including performance, memory usage, and efficiency of different programming constructs. This project is designed to help C++ developers understand the trade-offs of different approaches and optimize their applications.

Overview

Bench Cplusplus is a minimalistic benchmarking project designed to help developers measure the execution time of common C++ code snippets and functions.

Software Requirements

  • A modern C++ compiler supporting C++17 or higher:
  • CMake 3.16 or higher

Installation

  1. Clone the repository:
git clone https://github.com/allvphx/bench-cplusplus.git
  1. Build the project:
mkdir build
cd build
cmake ..
make
  1. Run benchmarks
./cplusplus_efficiency
taskset -c 0 ./cplusplus_efficiency

Benchmark APIs

For more details about the benchmarking functions, please refer to:

  • Function Call: complexity v.s. efficiency (virtual and CDPR), binary size v.s. efficiency (non-inline and inline), flexibility v.s. efficiency (indirect calls and regular calls, CDPR and virtual).

About

Benchmarking c++ operation efficiency on your platform.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published