Skip to content

test: add comprehensive single-threaded comparison benchmarks#6

Merged
hayabusa-cloud merged 1 commit into
mainfrom
bench
Jan 30, 2026
Merged

test: add comprehensive single-threaded comparison benchmarks#6
hayabusa-cloud merged 1 commit into
mainfrom
bench

Conversation

@hayabusa-cloud

Copy link
Copy Markdown
Owner

Summary

  • Add uncontended benchmarks comparing atomix vs sync/atomic across all operation types
  • Cover Load, Store, Add, Swap, CAS, CompareExchange, Or, And, Xor for Int32, Int64, Uintptr, and Uint128
  • Each operation is benchmarked at every supported memory ordering (Relaxed, Acquire, Release, AcqRel)

Test plan

  • make bench runs all benchmarks
  • Benchmark names filter correctly: go test -bench=BenchmarkComp
  • Zero allocations reported for all benchmarks (-benchmem)

Copilot AI review requested due to automatic review settings January 30, 2026 12:08
@codecov

codecov Bot commented Jan 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a new benchmark suite intended to provide comprehensive, single-threaded performance comparisons between sync/atomic and atomix across multiple operation types and memory orderings.

Changes:

  • Introduces comprehensive_bench_test.go with a large set of uncontended benchmarks for Int32/Int64 operations (plus partial coverage for Uintptr and Uint128).
  • Adds atomix-only benchmarks for operations not directly available in sync/atomic (e.g., CompareExchange, Xor).
  • Adds barrier benchmarks for atomix memory fences.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread comprehensive_bench_test.go
Comment thread comprehensive_bench_test.go
Comment thread comprehensive_bench_test.go
Comment thread comprehensive_bench_test.go
Comment thread comprehensive_bench_test.go
Comment thread comprehensive_bench_test.go
@hayabusa-cloud hayabusa-cloud merged commit ce49198 into main Jan 30, 2026
4 checks passed
@hayabusa-cloud hayabusa-cloud deleted the bench branch January 30, 2026 12:14
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