File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -304,13 +304,13 @@ make bench
304304
305305### Benchmark Results
306306
307- | Benchmark | Iterations | ns/op | B/op | allocs/op |
308- | --------------------------------------------------| ------------| ------:| -----:| ----------:|
309- | [ LockFreeQ ] ( lock_free_queue_benchmark_test.go ) | 24752019 | 79.73 | 16 | 1 |
310- | [ NewLockFreeQ] ( lock_free_queue_benchmark_test.go ) | 1000000000 | 0.29 | 0 | 0 |
311- | [ LockFreeQ_Enqueue ] ( lock_free_queue_benchmark_test.go ) | 25041442 | 49.18 | 16 | 1 |
312- | [ LockFreeQ_Dequeue ] ( lock_free_queue_benchmark_test.go ) | 338000521 | 11.14 | 0 | 0 |
313- | [ LockFreeQ_IsEmpty ] ( lock_free_queue_benchmark_test.go ) | 1000000000 | 0.60 | 0 | 0 |
307+ | Benchmark | Iterations | ns/op | B/op | allocs/op |
308+ | ------------------------------------------------------- | ------------| ------:| -----:| ----------:|
309+ | [ LockFreeQueue ] ( lock_free_queue_benchmark_test.go ) | 24752019 | 79.73 | 16 | 1 |
310+ | [ NewLockFreeQ] ( lock_free_queue_benchmark_test.go ) | 1000000000 | 0.29 | 0 | 0 |
311+ | [ LockFreeQEnqueue ] ( lock_free_queue_benchmark_test.go ) | 25041442 | 49.18 | 16 | 1 |
312+ | [ LockFreeQDequeue ] ( lock_free_queue_benchmark_test.go ) | 338000521 | 11.14 | 0 | 0 |
313+ | [ LockFreeQIsEmpty ] ( lock_free_queue_benchmark_test.go ) | 1000000000 | 0.60 | 0 | 0 |
314314
315315> These benchmarks reflect fast, allocation-free lookups for most retrieval functions, ensuring optimal performance in production environments.
316316> Performance benchmarks for the core functions in this library, executed on a 13th Gen Intel i7-1360P (AMD64).
Original file line number Diff line number Diff line change 66 "sync/atomic"
77)
88
9+ // node represents a single element in the lock-free queue.
910type node [T any ] struct {
1011 value T
1112 next atomic.Pointer [node [T ]]
You can’t perform that action at this time.
0 commit comments