- Implementations:
- 1-queue.js — Interface with naïve implementation on the top of Array
- 2-naïve.js — naïve implementation on the top of singly linked list
- 3-fixed.js — FixedQueue (from Node.js) on the top of FixedCircularBuffer
- 4-unrolled.js — UnrolledQueue on the top of unrolled array
- 5-spare.js — unrolled array + single spare (free) item
- 6-pool.js — unrolled array + object pool
- 7-current.js — unrolled array combined with pool into common singly linked list
- 8-circular.js — circular buffer + unrolled array
- 9-no-div.js — circular buffer + unrolled array without div operation
- Production-ready code
- Metarhia: metautil
- Node.js implementation: lib/internal/fixed_queue.js
- Underlying data structures:
- Related async abstractions:
Node: UNDER CONSTRUCTION
Run: Performance/run.sh
┌──────────┬──────────┬───────────┐
│ (index) │ cpu │ memory │
├──────────┼──────────┼───────────┤
│ queue │ '576.54' │ '5524.62' │
│ naïve │ '12.06' │ '7620.13' │
│ fixed │ '6.32' │ '6045.08' │
│ unrolled │ '6.46' │ '6045.98' │
│ spare │ '6.72' │ '5896.03' │
│ pool │ '6.51' │ '6029.93' │
│ circular │ '5.67' │ '5510.35' │
│ nodiv │ '4.45' │ '4093.59' │
└──────────┴──────────┴───────────┘