Skip to content

Add MPMC comparison benchmark#2

Merged
dakingffo merged 1 commit intodakingffo:masterfrom
caomengxuan666:add-mpmc-comparison-benchmark
May 6, 2026
Merged

Add MPMC comparison benchmark#2
dakingffo merged 1 commit intodakingffo:masterfrom
caomengxuan666:add-mpmc-comparison-benchmark

Conversation

@caomengxuan666
Copy link
Copy Markdown
Contributor

Summary

  • add moodycamel::ConcurrentQueue v1.0.5 as an MPMC reference queue
  • add a Google Benchmark target that compares uniform single enqueue, uneven wave, and bulk enqueue MPSC workloads
  • document the Clang Release benchmark results in both English and Chinese READMEs

Validation

  • cmake -S . -B out/build/clang-local -G Ninja -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release
  • cmake --build out/build/clang-local --target mpsc_vs_mpmc_benchmark
  • cmake --build out/build/clang-local --target mpsc_tests
  • ctest --test-dir out/build/clang-local -R MPSC --output-on-failure
  • .\out\build\clang-local\mpsc_vs_mpmc_benchmark.exe --benchmark_min_time=0.1s --benchmark_repetitions=1 --benchmark_counters_tabular=true

Copy link
Copy Markdown
Owner

@dakingffo dakingffo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An automated comparsion benchmark test is indeed better.

Comment thread CMakeLists.txt

find_package(Threads REQUIRED)

set(ATOMIC_LIBRARY
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great simplification!

@dakingffo dakingffo self-assigned this May 6, 2026
@dakingffo dakingffo merged commit cb45dae into dakingffo:master May 6, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants