Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@


# MPSC_queue

[![C++](https://img.shields.io/badge/C++-17-blue.svg?logo=cplusplus)](https://isocpp.org/)
Expand Down Expand Up @@ -149,7 +151,7 @@ This scenario tests the throughput when multiple producers write to the queue co

| Queue | P (Producers) | C (Consumer) | **Throughput (M int/s)** | Notes |
| :--- | :--- | :--- | :--- | :--- |
| **daking** | 1 | 1 | **150.146** | **SPSC Baseline (Fast Path)** |
| **daking** | 1 | 1 | **150.14646** | **SPSC Baseline (Fast Path)** |
| daking | 2 | 1 | 46.9628 | |
| daking | 4 | 1 | 58.246 | Peak under uniform contention |
| daking | 8 | 1 | 49.686 | |
Expand Down Expand Up @@ -320,7 +322,7 @@ queue.enqueue_bulk(input.begin(), 3);

int max_fetch = 3;
std::vector<int> output;
// try_dequeue_bulk is likely intended here, but using 'results' from previous context for consistency with the prompt.
// Dequeues up to max_fetch elements into output.
size_t count = queue.try_dequeue_bulk(std::back_inserter(output), max_fetch);
// Returns the number of successfully dequeued elements (not exceeding max_fetch).
// Supports both Forward Iterators (e.g., output.begin()) and Output Iterators (e.g., back_inserter).
Expand Down