Skip to content

feat: upgrade ring buffer indices to std::atomic - #8

Merged
HawkinWay merged 3 commits into
mainfrom
2-feature-upgrade-indices-to-std-atomic
Jul 24, 2026
Merged

feat: upgrade ring buffer indices to std::atomic#8
HawkinWay merged 3 commits into
mainfrom
2-feature-upgrade-indices-to-std-atomic

Conversation

@HawkinWay

Copy link
Copy Markdown
Owner

Changes

  • Replace non-atomic read/write indices with std::atomic
  • Add atomic synchronization for producer/consumer coordination
  • Update benchmark infrastructure for comparing implementations
  • Add seq_cst benchmark results

Benchmark

Before (non-atomic): ~313M ops/s

After (default std::atomic seq_cst): ~60M ops/s

Notes

This implementation uses the default memory_order_seq_cst.
Future improvements will explore acquire/release ordering and cache-line optimization.

@HawkinWay
HawkinWay merged commit 6d26125 into main Jul 24, 2026
3 checks passed
@HawkinWay
HawkinWay deleted the 2-feature-upgrade-indices-to-std-atomic branch July 24, 2026 12:33
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.

1 participant