awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
google avatar

google/benchmark

0
View on GitHub↗
10,240 stars·1,769 forks·C++·Apache-2.0·31 views

Benchmark

This project is a performance measurement framework and microbenchmarking library designed for C++ and Python. It provides a toolset for measuring the execution time of small code fragments using high-resolution timers, calculating statistical aggregates, and analyzing asymptotic complexity.

The framework distinguishes itself through specialized capabilities for multithreaded performance testing, using synchronized execution to measure parallel throughput. It includes mechanisms to prevent compiler optimizations from removing benchmarked code and supports complex parameterization via Cartesian products to test functions across various input ranges.

The broader capability surface covers statistical performance validation, including mean, median, and standard deviation reporting, as well as result comparison using p-value testing. It further provides environment management through fixtures and lifecycle callbacks, along with data export options for console text, JSON, and CSV formats.

The C++ core is extended to Python through native bindings and a corresponding build system for distribution.

Features

  • C++ Microbenchmarking Libraries - Provides a high-performance C++ library for measuring the execution time of small code fragments.
  • C++ Microbenchmarking - Provides a high-performance framework for measuring small code fragments in C++ using high-resolution timers.
  • Multithreaded Benchmarking Tools - Provides a framework for measuring the performance of code executed across multiple threads with synchronized execution.
  • Benchmark Thread Synchronization - Coordinates multiple worker threads to start and stop simultaneously using barriers to measure parallel throughput.
  • Compiler Optimization Validation - Prevents the compiler from optimizing away benchmarked code to ensure measurements reflect actual execution costs.
  • Optimization Barriers - Implements volatile memory writes and compiler barriers to prevent the optimizer from removing benchmarked code.
  • Thread-Synchronized Execution - Coordinates multiple worker threads to start and stop simultaneously using barriers to measure parallel throughput.
  • Python Bindings - Provides native Python bindings to the C++ core for high-performance timing in scripted environments.
  • Parametric Benchmark Generation - Supports complex parameterization via Cartesian products to test functions across all possible input combinations.
  • Complexity Analysis - Calculates algorithmic Big O complexity by fitting execution times against varying input sizes using linear regression.
  • Monotonic Time Measurement - Utilizes high-resolution CPU and wall-clock timers to measure the duration of small code fragments.
  • Benchmark Parameterization - Allows a single benchmark function to run across multiple input values using ranges or Cartesian products.
  • Code Block Timing - A timing mechanism that tracks the execution of a specific code block within a loop.
  • Compiler Optimization Prevention - Employs volatile memory writes and compiler barriers to prevent the optimizer from removing benchmarked code.
  • Iterative Timing Loops - Runs target code repeatedly in a loop to average out noise and reach a stable measurement.
  • Parallel Test Execution - Executes benchmarks across multiple concurrent threads to measure performance in parallel environments.
  • Parameterized Benchmarks - Provides a system to run benchmarks across multiple input ranges and combinations via Cartesian products.
  • Performance Analysis - Includes tools for comparing benchmark results and testing statistical significance to evaluate algorithmic efficiency.
  • Asymptotic Complexity Models - Computes the Big O asymptotic complexity of benchmarks by analyzing the high-order term coefficients.
  • Performance Measurement - Implements a comprehensive toolset for high-resolution timing, statistical aggregates, and asymptotic complexity analysis.
  • Multithreaded Throughput Measurement - Provides specialized capabilities for measuring parallel throughput and scaling behavior across multiple CPU threads.
  • Statistical Iteration Aggregation - Executes benchmarks multiple times to calculate mean, median, and standard deviation to reduce measurement noise.
  • Statistical Performance Reporting - Calculates and reports the mean, median, and standard deviation for benchmarks executed across multiple repetitions.
  • Statistical Sampling Benchmarks - Executes benchmarks repeatedly to gather statistical distributions of execution times and determine statistical significance.
  • Custom Performance Counters - Provides a per-benchmark storage map for user-defined metrics that are reported alongside timing data.
  • Benchmark Execution Control - Provides mechanisms to filter benchmarks via regular expressions or limit execution time.
  • Statistical Significance Testing - Implements p-value calculations via U-tests to validate the statistical significance of performance changes.
  • User-Defined Statistical Metrics - Allows the calculation of user-defined metrics for repeated benchmark runs using custom lambda functions.
  • Metric Collection - Allows tracking of user-defined counters and integration with memory managers to report additional performance metrics.
  • Lifecycle Management - Implements global or per-benchmark setup and teardown callbacks to manage the test environment.
  • User-Defined Performance Counters - Provides a per-benchmark storage map for user-defined metrics that are aggregated and reported.
  • Benchmark Result Comparison - Provides utilities to analyze and compare differences between two sets of benchmark results.
  • Language-Specific Benchmarking Bindings - Extends the C++ benchmarking core to Python through native bindings for high-performance timing.
  • Parameterized Performance Tuning - Supports complex parameterization via Cartesian products to test functions across various input ranges.
  • Fixture Definitions - Provides a mechanism to set up reusable environments for groups of benchmarks via fixture classes.
  • Test Execution Filtering - Enables the execution of a specific subset of benchmarks that match a provided regular expression.
  • Benchmarking Tools - Support library for micro-benchmarking C++ code.
  • Performance Analysis Tools - Microbenchmark support library for tracking C++ performance.
  • Testing and Benchmarking - Micro-benchmarking support library.
  • Testing and Debugging - Library for microbenchmarking C++ code.

Star history

Star history chart for google/benchmarkStar history chart for google/benchmark

How this analysis was created: This summary and feature list are AI-generated from collected project material and can contain mistakes. Stars, license and language are imported from GitHub. Inclusion does not mean that we have tested or audited this project. Check the source documentation for any feature you depend on. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Projects sharing features with Benchmark

These projects share indexed features with Benchmark. Shared tags can include platform or build tooling; verify the primary use case before treating a result as a replacement.
  • bestiejs/benchmark.jsbestiejs avatar

    bestiejs/benchmark.js

    5,465View on GitHub↗

    benchmark.js is a benchmarking and statistical analysis library designed to measure and compare the execution speeds of JavaScript functions. It serves as a performance measurement tool that calculates mean execution time, margin of error, and standard deviation for specific code implementations. The library provides capabilities for comparing benchmark results to determine relative speed and manages organized test suites that can be run, cloned, or reset in bulk. It includes sampling precision controls to adjust minimum sample sizes and maximum run times to ensure statistical reliability. T

    JavaScript
    View on GitHub↗5,465
  • sharkdp/hyperfinesharkdp avatar

    sharkdp/hyperfine

    28,316View on GitHub↗

    Hyperfine is a command-line benchmarking tool used to measure the execution time of shell commands through multiple runs and statistical analysis. It functions as a comparative benchmarking utility and a shell performance analyzer, allowing for the evaluation of multiple commands against a reference baseline to determine relative speed. The tool distinguishes itself by isolating actual command performance through shell overhead correction and the ability to bypass the shell entirely using system calls. It supports parameterized execution, enabling benchmarks to run across a range of varying i

    Rust
    View on GitHub↗28,316
  • federico-busato/modern-cpp-programmingfederico-busato avatar

    federico-busato/Modern-CPP-Programming

    15,808View on GitHub↗

    This project is a comprehensive educational resource and programming course covering C++ language semantics and features from C++03 through C++26. It provides structured tutorials and technical guides focused on modern C++ development. The material offers specialized instruction on template metaprogramming, including the use of type traits and compile-time computations. It features detailed guides on concurrency and parallelism for multi-core execution, as well as a reference for software design applying SOLID principles and RAII. Additionally, it covers build performance optimization to redu

    HTMLc-plus-pluscode-qualitycompilers
    View on GitHub↗15,808
  • digitalinblue/celeroDigitalInBlue avatar

    DigitalInBlue/Celero

    861View on GitHub↗

    C++ Benchmark Authoring Library/Framework

    C++benchmarkbenchmark-testsc-plus-plus
    View on GitHub↗861
Compare all 30 related projects→

Frequently asked questions

What does google/benchmark do?

This project is a performance measurement framework and microbenchmarking library designed for C++ and Python. It provides a toolset for measuring the execution time of small code fragments using high-resolution timers, calculating statistical aggregates, and analyzing asymptotic complexity.

What are the main features of google/benchmark?

The main features of google/benchmark are: C++ Microbenchmarking Libraries, C++ Microbenchmarking, Multithreaded Benchmarking Tools, Benchmark Thread Synchronization, Compiler Optimization Validation, Optimization Barriers, Thread-Synchronized Execution, Python Bindings.

Which projects share features with google/benchmark?

Projects with overlapping indexed features include: bestiejs/benchmark.js — benchmark.js is a benchmarking and statistical analysis library designed to measure and compare the execution speeds… sharkdp/hyperfine — Hyperfine is a command-line benchmarking tool used to measure the execution time of shell commands through multiple… federico-busato/modern-cpp-programming — This project is a comprehensive educational resource and programming course covering C++ language semantics and… libnonius/nonius — A C++ micro-benchmarking framework. digitalinblue/celero — C++ Benchmark Authoring Library/Framework. martinus/nanobench — Simple, fast, accurate single-header microbenchmarking functionality for C++11/14/17/20.