Skip to content
Merged
Show file tree
Hide file tree
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
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,13 +304,13 @@ make bench

### Benchmark Results

| Benchmark | Iterations | ns/op | B/op | allocs/op |
|--------------------------------------------------|------------|------:|-----:|----------:|
| [LockFreeQ](lock_free_queue_benchmark_test.go) | 24752019 | 79.73 | 16 | 1 |
| [NewLockFreeQ](lock_free_queue_benchmark_test.go) | 1000000000 | 0.29 | 0 | 0 |
| [LockFreeQ_Enqueue](lock_free_queue_benchmark_test.go) | 25041442 | 49.18 | 16 | 1 |
| [LockFreeQ_Dequeue](lock_free_queue_benchmark_test.go) | 338000521 | 11.14 | 0 | 0 |
| [LockFreeQ_IsEmpty](lock_free_queue_benchmark_test.go) | 1000000000 | 0.60 | 0 | 0 |
| Benchmark | Iterations | ns/op | B/op | allocs/op |
|-------------------------------------------------------|------------|------:|-----:|----------:|
| [LockFreeQueue](lock_free_queue_benchmark_test.go) | 24752019 | 79.73 | 16 | 1 |
| [NewLockFreeQ](lock_free_queue_benchmark_test.go) | 1000000000 | 0.29 | 0 | 0 |
| [LockFreeQEnqueue](lock_free_queue_benchmark_test.go) | 25041442 | 49.18 | 16 | 1 |
| [LockFreeQDequeue](lock_free_queue_benchmark_test.go) | 338000521 | 11.14 | 0 | 0 |
| [LockFreeQIsEmpty](lock_free_queue_benchmark_test.go) | 1000000000 | 0.60 | 0 | 0 |

> These benchmarks reflect fast, allocation-free lookups for most retrieval functions, ensuring optimal performance in production environments.
> Performance benchmarks for the core functions in this library, executed on a 13th Gen Intel i7-1360P (AMD64).
Expand Down
1 change: 1 addition & 0 deletions lock_free_queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"sync/atomic"
)

// node represents a single element in the lock-free queue.
type node[T any] struct {
value T
next atomic.Pointer[node[T]]
Expand Down
Loading